sourceManifest = jarIn.getManifest();
if (sourceManifest == null)
logger.log(WARNING, file + " has no manifest");
- else {
- if (!doNotModify)
- sourceManifest.getMainAttributes().remove(REQUIRE_BUNDLE.toString());
- }
manifest = sourceManifest != null ? new Manifest(sourceManifest) : new Manifest();
String rawSourceSymbolicName = manifest.getMainAttributes().getValue(BUNDLE_SYMBOLICNAME.toString());
for (Iterator<Map.Entry<Object, Object>> manifestEntries = manifest.getMainAttributes().entrySet()
.iterator(); manifestEntries.hasNext();) {
Map.Entry<Object, Object> manifestEntry = manifestEntries.next();
- switch (manifestEntry.getKey().toString()) {
+ String key = manifestEntry.getKey().toString();
+ // TODO make it more generic
+ if (key.equals(REQUIRE_BUNDLE.toString()) && nameVersion.getName().equals("com.sun.jna.platform"))
+ manifestEntries.remove();
+ switch (key) {
case "Archiver-Version":
case "Build-By":
case "Created-By":