Skip to content

Commit fbae6a1

Browse files
Jörg Kubitzjukzi
authored andcommitted
ProjectPreferences: mt hardening
volatile members
1 parent dba97fe commit fbae6a1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectPreferences.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,24 +75,24 @@ public class ProjectPreferences extends EclipsePreferences {
7575
*/
7676
private static final Set<String> loadedNodes = ConcurrentHashMap.newKeySet();
7777
private IFile file;
78-
private boolean initialized = false;
78+
private volatile boolean initialized;
7979
/**
8080
* Flag indicating that this node is currently reading values from disk,
8181
* to avoid flushing during a read.
8282
*/
83-
private boolean isReading;
83+
private volatile boolean isReading;
8484
/**
8585
* Flag indicating that this node is currently writing values to disk,
8686
* to avoid re-reading after the write completes.
8787
*/
88-
private boolean isWriting;
88+
private volatile boolean isWriting;
8989
private IEclipsePreferences loadLevel;
9090
private final IProject project;
9191
private final String qualifier;
9292

9393
// cache
9494
private final int segmentCount;
95-
private Workspace workspace;
95+
private volatile Workspace workspace;
9696

9797
static void deleted(IFile file) throws CoreException {
9898
IPath path = file.getFullPath();

0 commit comments

Comments
 (0)