/** * Invalid exports are exports mentioned in the manifest but not found on * the classpath. This can be calculated with: exports - contains. * * Unfortunately, we also must take duplicate names into account. These * duplicates are of course no erroneous. */ private void verifyInvalidExports() { Set<String> invalidExport = newSet(mexports.keySet()); invalidExport.removeAll(contained.keySet()); // We might have duplicate names that are marked for it. These // should not be counted. Should we test them against the contained // set? Hmm. If someone wants to hang himself by using duplicates than // I guess he can go ahead ... This is not a recommended practice for (Iterator<String> i = invalidExport.iterator(); i.hasNext();) { String pack = i.next(); if (isDuplicate(pack)) i.remove(); } if (!invalidExport.isEmpty()) error("Exporting packages that are not on the Bundle-Classpath" + bundleClasspath + ": " + invalidExport); }
/** * Invalid exports are exports mentioned in the manifest but not found on * the classpath. This can be calculated with: exports - contains. * * Unfortunately, we also must take duplicate names into account. These * duplicates are of course no erroneous. */ private void verifyInvalidExports() { Set<String> invalidExport = newSet(mexports.keySet()); invalidExport.removeAll(contained.keySet()); // We might have duplicate names that are marked for it. These // should not be counted. Should we test them against the contained // set? Hmm. If someone wants to hang himself by using duplicates than // I guess he can go ahead ... This is not a recommended practice for (Iterator<String> i = invalidExport.iterator(); i.hasNext();) { String pack = i.next(); if (isDuplicate(pack)) i.remove(); } if (!invalidExport.isEmpty()) error("Exporting packages that are not on the Bundle-Classpath" + bundleClasspath + ": " + invalidExport); }