incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r1463457 - /sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/ScriptEngineManagerFactory.java
Date Tue, 02 Apr 2013 09:19:27 GMT
Author: fmeschbe
Date: Tue Apr  2 09:19:27 2013
New Revision: 1463457

URL: http://svn.apache.org/r1463457
Log:
SLING-2806 Ignore empty lines in ScriptEngineFactory file (thanks Róbert Csákány for the
patch)

Modified:
    sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/ScriptEngineManagerFactory.java

Modified: sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/ScriptEngineManagerFactory.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/ScriptEngineManagerFactory.java?rev=1463457&r1=1463456&r2=1463457&view=diff
==============================================================================
--- sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/ScriptEngineManagerFactory.java
(original)
+++ sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/ScriptEngineManagerFactory.java
Tue Apr  2 09:19:27 2013
@@ -140,7 +140,7 @@ public class ScriptEngineManagerFactory 
             BufferedReader reader = new BufferedReader(new InputStreamReader(ins));
             String line;
             while ((line = reader.readLine()) != null) {
-            	if (!line.startsWith("#")){
+                if (!line.startsWith("#") && line.trim().length() > 0) {
 	                try {
 	                    Class<ScriptEngineFactory> clazz = bundle.loadClass(line);
 	                    ScriptEngineFactory spi = clazz.newInstance();



Mime
View raw message