From 78e33430442b77296d8a229b739921ef551dd41a Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Thu, 22 Oct 2009 15:41:32 +0000 Subject: PR cp-tools/39177 * tools/gnu/classpath/tools/jar/Creator.java 2009-10-22 Richard Guenther PR cp-tools/39177 * tools/gnu/classpath/tools/jar/Creator.java (writeCommandLineEntries): Do not use uninitialized manifest. * tools/classes/gnu/classpath/tools/jar/Creator.class: Re-generated. From-SVN: r153461 --- libjava/classpath/ChangeLog | 7 +++++++ .../classes/gnu/classpath/tools/jar/Creator.class | Bin 7259 -> 6001 bytes .../tools/gnu/classpath/tools/jar/Creator.java | 11 +++++++---- 3 files changed, 14 insertions(+), 4 deletions(-) (limited to 'libjava/classpath') diff --git a/libjava/classpath/ChangeLog b/libjava/classpath/ChangeLog index 475e6bd..a2df28c 100644 --- a/libjava/classpath/ChangeLog +++ b/libjava/classpath/ChangeLog @@ -1,3 +1,10 @@ +2009-10-22 Richard Guenther + + PR cp-tools/39177 + * tools/gnu/classpath/tools/jar/Creator.java (writeCommandLineEntries): + Do not use uninitialized manifest. + * tools/classes/gnu/classpath/tools/jar/Creator.class: Re-generated. + 2009-08-26 Dave Korn * ltmain.sh (removedotparts): Don't use comma as 's' separator. diff --git a/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Creator.class b/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Creator.class index 517fe0c..ad4cc74 100644 Binary files a/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Creator.class and b/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Creator.class differ diff --git a/libjava/classpath/tools/gnu/classpath/tools/jar/Creator.java b/libjava/classpath/tools/gnu/classpath/tools/jar/Creator.java index a6b6112..6ffce18 100644 --- a/libjava/classpath/tools/gnu/classpath/tools/jar/Creator.java +++ b/libjava/classpath/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); -- cgit v1.1