Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2006-09-19 10:38:57 -0400
committerThomas Watson2006-09-19 10:38:57 -0400
commitae7f9e6e6b1ff778f3ac79fc62f8e75f5cc57902 (patch)
tree34143f10ece732ce7793103d10d3cf5a53204705
parenta8314112462fbfc0ef677fef1da0fed408fa02bf (diff)
downloadrt.equinox.framework-ae7f9e6e6b1ff778f3ac79fc62f8e75f5cc57902.tar.gz
rt.equinox.framework-ae7f9e6e6b1ff778f3ac79fc62f8e75f5cc57902.tar.xz
rt.equinox.framework-ae7f9e6e6b1ff778f3ac79fc62f8e75f5cc57902.zip
Bug 157723 NullPointerException in StateReader.readBundleDescriptionLazyDataR3_2_1R32x_v20060919
-rw-r--r--bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/StateManager.java2
-rw-r--r--bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateImpl.java13
2 files changed, 10 insertions, 5 deletions
diff --git a/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/StateManager.java b/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/StateManager.java
index 7a039bab0..5f491053e 100644
--- a/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/StateManager.java
+++ b/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/StateManager.java
@@ -298,7 +298,7 @@ public class StateManager implements PlatformAdmin, Runnable {
} catch (InterruptedException e) {
return;
}
- if (systemState != null && timeStamp == systemState.getTimeStamp())
+ if (systemState != null && timeStamp == systemState.getTimeStamp() && !systemState.dynamicCacheChanged())
systemState.unloadLazyData(expireTime);
}
}
diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateImpl.java b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateImpl.java
index d6ba5059b..923f132cc 100644
--- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateImpl.java
+++ b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateImpl.java
@@ -623,11 +623,15 @@ public abstract class StateImpl implements State {
}
public void fullyLoad() {
- if (fullyLoaded == true)
+ if (reader == null)
return;
- if (reader != null && reader.isLazyLoaded())
- reader.fullyLoad();
- fullyLoaded = true;
+ synchronized (reader) {
+ if (fullyLoaded == true)
+ return;
+ if (reader.isLazyLoaded())
+ reader.fullyLoad();
+ fullyLoaded = true;
+ }
}
public void unloadLazyData(long expireTime) {
@@ -637,6 +641,7 @@ public abstract class StateImpl implements State {
reader.setAccessedFlag(false); // reset accessed flag
return;
}
+ fullyLoaded = false;
BundleDescription[] bundles = getBundles();
for (int i = 0; i < bundles.length; i++)
((BundleDescriptionImpl) bundles[i]).unload();

Back to the top