summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAndrew Haley <aph@redhat.com>2009-10-22 16:51:18 +0000
committerAndrew Haley <aph@redhat.com>2009-10-22 16:51:18 +0000
commitd13376fc5a0bb0a2ee0246e76ee3319e6baf9516 (patch)
tree04e140c03b4123587b0ed0e0423480d57faf88ed /tools
parentcca242d46d9679fe82e8457544ff2dda5c04121d (diff)
downloadclasspath-d13376fc5a0bb0a2ee0246e76ee3319e6baf9516.tar.gz
2009-10-22 Andrew Haley <aph@redhat.com>
* native/jni/native-lib/cpnet.c (cpnet_addMembership): Fix aliasing warning. (cpnet_dropMembership): Likewise. 2009-10-21 Richard Guenther <rguenther@suse.de> PR cp-tools/39177 * tools/gnu/classpath/tools/jar/Creator.java (writeCommandLineEntries): Do not use uninitialized manifest.
Diffstat (limited to 'tools')
-rw-r--r--tools/gnu/classpath/tools/jar/Creator.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/gnu/classpath/tools/jar/Creator.java b/tools/gnu/classpath/tools/jar/Creator.java
index a6b6112ca..6ffce18ac 100644
--- a/tools/gnu/classpath/tools/jar/Creator.java
+++ b/tools/gnu/classpath/tools/jar/Creator.java
@@ -216,11 +216,14 @@ public class Creator
manifest = createManifest(parameters);
/* If no version is specified, provide the same manifest version default
* as Sun's jar tool */
- Attributes attr = manifest.getMainAttributes();
- if (attr.getValue(Attributes.Name.MANIFEST_VERSION) == null)
- attr.putValue(Attributes.Name.MANIFEST_VERSION.toString(), "1.0");
- attr.putValue("Created-By", System.getProperty("java.version") +
+ if (parameters.wantManifest)
+ {
+ Attributes attr = manifest.getMainAttributes();
+ if (attr.getValue(Attributes.Name.MANIFEST_VERSION) == null)
+ attr.putValue(Attributes.Name.MANIFEST_VERSION.toString(), "1.0");
+ attr.putValue("Created-By", System.getProperty("java.version") +
" (" + System.getProperty("java.vendor") + ")");
+ }
outputStream = new JarOutputStream(os, manifest);
// FIXME: this sets the method too late for the manifest file.
outputStream.setMethod(parameters.storageMode);