This is an automated email from the ASF dual-hosted git repository.
radu pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-javascript.git
The following commit(s) were added to refs/heads/master by this push:
new ee70468 SLING-8695 - Make sure that the Sling modules' pom files
provide a name value that's consistent with the JIRA releases
ee70468 is described below
commit ee704689335074bfd53d469321fc6d6ddf0005eb
Author: Radu Cotescu <[email protected]>
AuthorDate: Mon Dec 2 15:25:12 2019 +0100
SLING-8695 - Make sure that the Sling modules' pom files provide a name
value that's consistent with the JIRA releases
* adjusted test (no need to look for the Bundle-Name header)
---
.../javascript/internal/RhinoJavaScriptEngineFactory.java | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git
a/src/main/java/org/apache/sling/scripting/javascript/internal/RhinoJavaScriptEngineFactory.java
b/src/main/java/org/apache/sling/scripting/javascript/internal/RhinoJavaScriptEngineFactory.java
index 70711a1..67908d8 100644
---
a/src/main/java/org/apache/sling/scripting/javascript/internal/RhinoJavaScriptEngineFactory.java
+++
b/src/main/java/org/apache/sling/scripting/javascript/internal/RhinoJavaScriptEngineFactory.java
@@ -239,18 +239,16 @@ public class RhinoJavaScriptEngineFactory extends
AbstractScriptEngineFactory im
InputStream ins = null;
try {
Enumeration<URL> resources =
RhinoJavaScriptEngineFactory.class.getClassLoader().getResources("META-INF/MANIFEST.MF");
- boolean foundEntries = false;
- while (resources.hasMoreElements() && !foundEntries) {
+ while (resources.hasMoreElements()) {
try {
URL url = resources.nextElement();
ins = url.openStream();
if (ins != null) {
Manifest manifest = new Manifest(ins);
Attributes attrs = manifest.getMainAttributes();
- String bundleName = attrs.getValue("Bundle-Name");
- if (bundleName != null && "Apache Sling Scripting
JavaScript Support".equals(bundleName)) {
- rhinoVersion = attrs.getValue("Rhino-Version");
- foundEntries = true;
+ rhinoVersion = attrs.getValue("Rhino-Version");
+ if (rhinoVersion != null) {
+ break;
}
}
} finally {