diff options
author | acolyer <acolyer> | 2003-11-04 14:31:12 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2003-11-04 14:31:12 +0000 |
commit | 32020228f067879bb277ee57f5b8d1baa4dabae2 (patch) | |
tree | b5c7b6d1ede10f04e3936b5ce9dad96729fafe72 /weaver | |
parent | 60c03aca9e32181a1cc93a7147e0a2b2a18de1e1 (diff) | |
download | aspectj-32020228f067879bb277ee57f5b8d1baa4dabae2.tar.gz aspectj-32020228f067879bb277ee57f5b8d1baa4dabae2.zip |
Fix from Matthew Webster for copying first resource in jars and
for copying first Manifest.mf file
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java index 9730bbdec..51b5333ed 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java @@ -128,16 +128,9 @@ public class BcelWeaver implements IWeaver { this.addClassFile(classFile); } else if (!entry.isDirectory()) { -// System.err.println("? addJarFile() filename='" + filename + "'"); - - /* Don't copy JAR manifests */ - if (filename.toLowerCase().startsWith("meta-inf")) { - world.showMessage(IMessage.WARNING, "manifest not copied: '" + filename + - "' in JAR '" + inFile + "'", null, null); - } - else { - addResource(filename,classFile); - } + + /* bug-44190 Copy meta-data */ + addResource(filename,classFile); } inStream.closeEntry(); @@ -179,9 +172,12 @@ public class BcelWeaver implements IWeaver { } public void addResource (String name, UnwovenClassFile resourceFile) { - Object previous = resources.put(name, resourceFile); - if (null != previous) { - world.showMessage(IMessage.ERROR, "duplicate resource: '" + name + "'", + /* bug-44190 Change error to warning and copy first resource */ + if (!resources.containsKey(name)) { + resources.put(name, resourceFile); + } + else { + world.showMessage(IMessage.WARNING, "duplicate resource: '" + name + "'", null, null); } } |