| 1 |
Description: Fixes the logic to extract the implementation version from the manifest |
| 2 |
(only when the project is built with Ant, with Gradle the manifest is ok). |
| 3 |
Author: Emmanuel Bourg <[email protected]> |
| 4 |
Forwarded: https://github.com/mozilla/rhino/commit/f575445cbe5e245#commitcomment-20551124 |
| 5 |
--- a/src/org/mozilla/javascript/Context.java |
| 6 |
+++ b/src/org/mozilla/javascript/Context.java |
| 7 |
@@ -729,9 +729,9 @@ |
| 8 |
is = metaUrl.openStream(); |
| 9 |
Manifest mf = new Manifest(is); |
| 10 |
Attributes attrs = mf.getMainAttributes(); |
| 11 |
- if ("Mozilla Rhino".equals(attrs.getValue("Implementation-Title"))) { |
| 12 |
+ if (attrs.getValue("Implementation-Title") != null && attrs.getValue("Implementation-Title").startsWith("Mozilla Rhino")) { |
| 13 |
implementationVersion = |
| 14 |
- "Rhino " + attrs.getValue("Implementation-Version") + " " + attrs.getValue("Built-Date").replaceAll("-", " "); |
| 15 |
+ "Rhino " + attrs.getValue("Implementation-Version"); |
| 16 |
return implementationVersion; |
| 17 |
} |
| 18 |
} catch (IOException e) { |