summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ross2012-08-24 08:31:14 (EDT)
committer Thomas Watson2012-08-24 08:37:05 (EDT)
commit972588d94116486fa4fdd0767fb9ad9530aedb53 (patch)
tree53cac09df9202fad3210ea0d8ca008f27e3ca4e4
parent464ea4795b2c38ab0f297f3713955b6251f08ee3 (diff)
downloadrt.equinox.framework-972588d94116486fa4fdd0767fb9ad9530aedb53.zip
rt.equinox.framework-972588d94116486fa4fdd0767fb9ad9530aedb53.tar.gz
rt.equinox.framework-972588d94116486fa4fdd0767fb9ad9530aedb53.tar.bz2
Bug 377174 - IllegalStateException when using BundleLoader'sv20120824-123705M20120829-1200M20120829-1000
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) {