You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by en...@apache.org on 2022/02/21 22:51:41 UTC
[netbeans] branch master updated: A bogus Cyclic Reference issue resolved by making fields volatile. NETBEANS-6458
This is an automated email from the ASF dual-hosted git repository.
entl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/master by this push:
new c07fe19 A bogus Cyclic Reference issue resolved by making fields volatile. NETBEANS-6458
c07fe19 is described below
commit c07fe190473840887b0d6f7090151d17ebb0686f
Author: Martin Entlicher <ma...@oracle.com>
AuthorDate: Sat Feb 19 11:10:50 2022 +0100
A bogus Cyclic Reference issue resolved by making fields volatile. NETBEANS-6458
---
.../src/org/openide/loaders/FolderInstance.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/platform/openide.loaders/src/org/openide/loaders/FolderInstance.java b/platform/openide.loaders/src/org/openide/loaders/FolderInstance.java
index 84c24b0..fe8707e 100644
--- a/platform/openide.loaders/src/org/openide/loaders/FolderInstance.java
+++ b/platform/openide.loaders/src/org/openide/loaders/FolderInstance.java
@@ -107,28 +107,28 @@ public abstract class FolderInstance extends Task implements InstanceCookie { //
protected DataFolder folder;
/** container to work with */
- private DataObject.Container container;
+ private final DataObject.Container container;
/** map of primary file to their cookies (FileObject, HoldInstance) */
- private HashMap<FileObject, HoldInstance> map = new HashMap<FileObject, HoldInstance> (17);
+ private final HashMap<FileObject, HoldInstance> map = new HashMap<>(17);
/** Array of tasks that we have to check before we are ok. These are the tasks
* associated with children of the current folder.
*/
- private Task[] waitFor;
+ private volatile Task[] waitFor;
/** object for this cookie. Either the right instance of object or
* an instance of IOException or ClassNotFoundException. By default
* it is assigned to some private object in this class to signal that
* it is uninitialized.
*/
- private Object object = CURRENT;
+ private volatile Object object = CURRENT;
/** Listener and runner for this object */
- private Listener listener;
+ private final Listener listener;
/** error manager for this instance */
- private Logger err;
+ private final Logger err;
/** Task that computes the children list of the folder */
private Task recognizingTask;
@@ -136,7 +136,7 @@ public abstract class FolderInstance extends Task implements InstanceCookie { //
/** A task that gets objects from InstanceCookie's and calls createInstance.
* Started immediately after the <code>recognizingTask</code> is finished.
*/
- private Task creationTask;
+ private volatile Task creationTask;
/** Sequence number for creationTask */
private volatile int creationSequence;
/** shall instances be precreated before postCreationTask is called? */
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists