jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1847972 - /jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellInterpreter.java
Date Sun, 02 Dec 2018 11:13:52 GMT
Author: fschumacher
Date: Sun Dec  2 11:13:52 2018
New Revision: 1847972

URL: http://svn.apache.org/viewvc?rev=1847972&view=rev
Log:
Use StringUtils#isNotBlank to make intent clearer

Part of #435 and Bugzilla Id: 62972

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

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellInterpreter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellInterpreter.java?rev=1847972&r1=1847971&r2=1847972&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellInterpreter.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellInterpreter.java Sun Dec  2 11:13:52
2018
@@ -22,6 +22,7 @@ import java.io.File;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 
+import org.apache.commons.lang3.StringUtils;
 import org.apache.jorphan.util.JMeterError;
 import org.apache.jorphan.util.JMeterException;
 import org.slf4j.Logger;
@@ -122,7 +123,7 @@ public class BeanShellInterpreter {
                 log.warn("Can't set logger variable", e);
             }
         }
-        if (initFile != null && initFile.length() > 0) {
+        if (StringUtils.isNotBlank(initFile)) {
             String fileToUse=initFile;
             // Check file so we can distinguish file error from script error
             File in = new File(fileToUse);



Mime
View raw message