summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ross2012-08-24 08:31:14 (EDT)
committer Thomas Watson2012-08-24 08:31:14 (EDT)
commit6c178c339df4c827ccb6b790a988e7408be795d7 (patch)
tree881fa6599ed4c9eec3009f23eee0749d6ce1aa26
parentf7ee0e498eaa3e20e8a5079dd32a5ad89c77c6ee (diff)
downloadrt.equinox.framework-6c178c339df4c827ccb6b790a988e7408be795d7.zip
rt.equinox.framework-6c178c339df4c827ccb6b790a988e7408be795d7.tar.gz
rt.equinox.framework-6c178c339df4c827ccb6b790a988e7408be795d7.tar.bz2
Bug 377174 - IllegalStateException when using BundleLoader'sv20120824-123114I20120828-0800
addDynamicImportPackage method
-rw-r--r--bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java2
-rw-r--r--bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateImpl.java5
2 files changed, 4 insertions, 3 deletions
diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java
index 73ca260..d8d607f 100644
--- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java
+++ b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java
@@ -682,7 +682,6 @@ public final class BundleDescriptionImpl extends BaseDescriptionImpl implements
newImports[newImports.length - 1] = result;
lazyData.resolvedImports = newImports;
}
- setLazyLoaded(false);
}
void addDynamicImportPackages(ImportPackageSpecification[] dynamicImport) {
@@ -703,7 +702,6 @@ public final class BundleDescriptionImpl extends BaseDescriptionImpl implements
currentData.addedDynamicImports.add(addImport);
}
}
- setLazyLoaded(false);
}
private boolean equalImports(ImportPackageSpecification addImport, ImportPackageSpecification currentImport) {
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 7613216..75d62d8 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
@@ -1053,7 +1053,10 @@ public abstract class StateImpl implements State {
}
public void addDynamicImportPackages(BundleDescription importingBundle, ImportPackageSpecification[] dynamicImports) {
- ((BundleDescriptionImpl) importingBundle).addDynamicImportPackages(dynamicImports);
+ synchronized (this.monitor) {
+ ((BundleDescriptionImpl) importingBundle).addDynamicImportPackages(dynamicImports);
+ setDynamicCacheChanged(true);
+ }
}
void setReader(StateReader reader) {