aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2018-08-03 08:36:16 -0400
committerThomas Watson2018-08-03 08:36:16 -0400
commitf90ab848bdcac80a46b82e1d2e85d818d77630ef (patch)
treedff32baf836de72599be29cc8803c22973cf3b00
parentcaca3292f85ac32ddb26035c1e25913481192888 (diff)
downloadrt.equinox.framework-f90ab848bdcac80a46b82e1d2e85d818d77630ef.tar.gz
rt.equinox.framework-f90ab848bdcac80a46b82e1d2e85d818d77630ef.tar.xz
rt.equinox.framework-f90ab848bdcac80a46b82e1d2e85d818d77630ef.zip
Change-Id: Icfe95c03d677df9c929da98b17cc853d432a8b39 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java
index c541e6c8a..7019531fb 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java
@@ -1704,6 +1704,7 @@ public class Storage {
return result.toString();
}
+ @SuppressWarnings("unchecked")
private String calculateVMPackages() {
try {
List<String> packages = new ArrayList<>();
@@ -1714,10 +1715,10 @@ public class Storage {
Method getDescriptor = moduleClass.getMethod("getDescriptor"); //$NON-NLS-1$
Class<?> moduleDescriptorClass = Class.forName("java.lang.module.ModuleDescriptor"); //$NON-NLS-1$
Method exports = moduleDescriptorClass.getMethod("exports"); //$NON-NLS-1$
- Method isAutomatic = moduleDescriptorClass.getMethod("isAutomatic");
- Method packagesMethod = moduleDescriptorClass.getMethod("packages");
+ Method isAutomatic = moduleDescriptorClass.getMethod("isAutomatic"); //$NON-NLS-1$
+ Method packagesMethod = moduleDescriptorClass.getMethod("packages"); //$NON-NLS-1$
Class<?> exportsClass = Class.forName("java.lang.module.ModuleDescriptor$Exports"); //$NON-NLS-1$
- Method targets = exportsClass.getMethod("targets"); //$NON-NLS-1$
+ Method isQualified = exportsClass.getMethod("isQualified"); //$NON-NLS-1$
Method source = exportsClass.getMethod("source"); //$NON-NLS-1$
Object bootLayer = boot.invoke(null);
@@ -1735,7 +1736,7 @@ public class Storage {
} else {
for (Object export : (Set<?>) exports.invoke(descriptor)) {
String pkg = (String) source.invoke(export);
- if (((Set<?>) targets.invoke(export)).isEmpty()) {
+ if (!((Boolean) isQualified.invoke(export))) {
packages.add(pkg);
}
}