ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r802486 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/taskdefs/Manifest.java
Date Sun, 09 Aug 2009 05:18:00 GMT
Author: bodewig
Date: Sun Aug  9 05:18:00 2009
New Revision: 802486

URL: http://svn.apache.org/viewvc?rev=802486&view=rev
Log:
fall back to java.vm.version if java.runtime.version cannot be found

Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Manifest.java

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=802486&r1=802485&r2=802486&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Sun Aug  9 05:18:00 2009
@@ -141,8 +141,8 @@
    set failOnError to false.
    Bugzilla Report 47362.
 
- * Ant now uses the java.runtime.version instead of java.vm.version
-   system property for the Created-By Manifest attribute.
+ * Ant now prefers the java.runtime.version system property over
+   java.vm.version for the Created-By Manifest attribute.
    Bugzilla Report 47632.
 
 Fixed bugs:

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Manifest.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Manifest.java?rev=802486&r1=802485&r2=802486&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Manifest.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Manifest.java Sun Aug  9 05:18:00
2009
@@ -745,8 +745,12 @@
             try {
                 insr = new InputStreamReader(in, "UTF-8");
                 Manifest defaultManifest = new Manifest(insr);
+                String version = System.getProperty("java.runtime.version");
+                if (version == null) {
+                    version = System.getProperty("java.vm.version");
+                }
                 Attribute createdBy = new Attribute("Created-By",
-                    System.getProperty("java.runtime.version") + " ("
+                    version + " ("
                     + System.getProperty("java.vm.vendor") + ")");
                 defaultManifest.getMainSection().storeAttribute(createdBy);
                 return defaultManifest;



Mime
View raw message