diff options
author | Thomas Watson | 2018-08-03 12:36:16 +0000 |
---|---|---|
committer | Thomas Watson | 2018-08-03 12:36:16 +0000 |
commit | f90ab848bdcac80a46b82e1d2e85d818d77630ef (patch) | |
tree | dff32baf836de72599be29cc8803c22973cf3b00 | |
parent | caca3292f85ac32ddb26035c1e25913481192888 (diff) | |
download | rt.equinox.framework-f90ab848bdcac80a46b82e1d2e85d818d77630ef.tar.gz rt.equinox.framework-f90ab848bdcac80a46b82e1d2e85d818d77630ef.tar.xz rt.equinox.framework-f90ab848bdcac80a46b82e1d2e85d818d77630ef.zip |
Bug 537549 - Clean up some warnings, use isQualified instead of targetsY20180808-2200I20180810-0320I20180809-2000I20180808-2000I20180807-2000I20180807-1425I20180807-0350I20180806-2000I20180806-0300I20180805-2000I20180804-1500I20180803-2000
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.java | 9 |
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); } } |