Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2016-04-27 20:55:02 +0000
committerThomas Watson2016-04-27 21:20:22 +0000
commit7585991d024fb8603c8795204e4079dd7cdb9bce (patch)
treeca555c680117b3944411c147b74a855cfa4873a2
parentafc42a10430fb0f4eb2654c781cfd6c7ea8dcd48 (diff)
downloadrt.equinox.framework-7585991d024fb8603c8795204e4079dd7cdb9bce.tar.gz
rt.equinox.framework-7585991d024fb8603c8795204e4079dd7cdb9bce.tar.xz
rt.equinox.framework-7585991d024fb8603c8795204e4079dd7cdb9bce.zip
org.eclipse.osgi.framework.internal.reliablefile.ReliableFile.lastGenerationFile & lastGenerations Change-Id: Ie4133aaa52cc7b5a8c8cdba7f8ae0c349f4cf7b4 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/reliablefile/ReliableFile.java26
1 files changed, 19 insertions, 7 deletions
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/reliablefile/ReliableFile.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/reliablefile/ReliableFile.java
index 1cc893385..f0b0ffb5c 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/reliablefile/ReliableFile.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/reliablefile/ReliableFile.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2013 IBM Corporation and others.
+ * Copyright (c) 2003, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -404,8 +404,12 @@ public class ReliableFile {
CacheInfo info = new CacheInfo(FILETYPE_VALID, checksum, newFile.lastModified(), newFile.length());
cacheFiles.put(newFile, info);
cleanup(generations, true);
- lastGenerationFile = null;
- lastGenerations = null;
+ if (!fileSharing) {
+ synchronized (lastGenerationLock) {
+ lastGenerationFile = null;
+ lastGenerations = null;
+ }
+ }
}
/**
@@ -666,8 +670,12 @@ public class ReliableFile {
ReliableFile rf = new ReliableFile(base);
int[] generations = getFileGenerations(base);
rf.cleanup(generations, false);
- lastGenerationFile = null;
- lastGenerations = null;
+ if (!fileSharing) {
+ synchronized (lastGenerationLock) {
+ lastGenerationFile = null;
+ lastGenerations = null;
+ }
+ }
}
/**
@@ -676,8 +684,12 @@ public class ReliableFile {
* @param file
*/
public static void fileUpdated(File file) {
- lastGenerationFile = null;
- lastGenerations = null;
+ if (!fileSharing) {
+ synchronized (lastGenerationLock) {
+ lastGenerationFile = null;
+ lastGenerations = null;
+ }
+ }
}
/**

Back to the top