jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1406287 - /jmeter/trunk/src/core/org/apache/jmeter/util/JSR223TestElement.java
Date Tue, 06 Nov 2012 19:54:28 GMT
Author: pmouawad
Date: Tue Nov  6 19:54:28 2012
New Revision: 1406287

URL: http://svn.apache.org/viewvc?rev=1406287&view=rev
Log:
Bug 54106 - JSR223TestElement should check for file existence when a filename is set instead
of using Text Area content 
Fix space as per milamber note
Bugzilla Id: 54106

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/util/JSR223TestElement.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/JSR223TestElement.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/JSR223TestElement.java?rev=1406287&r1=1406286&r2=1406287&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/JSR223TestElement.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/JSR223TestElement.java Tue Nov  6 19:54:28
2012
@@ -173,10 +173,10 @@ public abstract class JSR223TestElement 
         boolean supportsCompilable = scriptEngine instanceof Compilable 
                 && !(scriptEngine.getClass().getName().equals("bsh.engine.BshScriptEngine"));
         if (!StringUtils.isEmpty(getFilename())) {
-            if(scriptFile.exists() && scriptFile.canRead()) {
+            if (scriptFile.exists() && scriptFile.canRead()) {
                 BufferedReader fileReader = null;
                 try {
-                    if(supportsCompilable) {
+                    if (supportsCompilable) {
                         String cacheKey = 
                                 getScriptLanguage()+"#"+
                                 scriptFile.getAbsolutePath()+"#"+
@@ -210,7 +210,7 @@ public abstract class JSR223TestElement 
             }  else {
                 throw new ScriptException("Script file '"+scriptFile.getAbsolutePath()+"'
does not exist or is unreadable for element:"+getName());
             }
-        } else if(!StringUtils.isEmpty(getScript())){
+        } else if (!StringUtils.isEmpty(getScript())){
             return scriptEngine.eval(getScript(), bindings);
         } else {
             throw new ScriptException("Both script file and script text are empty for element:"+getName());
           



Mime
View raw message