jmeter-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=1406375&view=rev
Log:
Bug 54107 - JSR223TestElement : Enable compilation and caching of Script Text
OUPS , Fix space as per milamber note
Bugzilla Id: 54107

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=1406375&r1=1406374&r2=1406375&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 22:12:06
2012
@@ -167,7 +167,7 @@ public abstract class JSR223TestElement 
      * @throws ScriptException
      */
     protected Object processFileOrScript(ScriptEngine scriptEngine, Bindings bindings) throws
IOException, ScriptException {
-        if(bindings == null) {
+        if (bindings == null) {
             bindings = scriptEngine.createBindings();
         }
         populateBindings(bindings);
@@ -186,11 +186,11 @@ public abstract class JSR223TestElement 
                                         scriptFile.lastModified();
                         CompiledScript compiledScript = 
                                 compiledScriptsCache.get(cacheKey);
-                        if(compiledScript==null) {
+                        if (compiledScript==null) {
                             synchronized (compiledScriptsCache) {
                                 compiledScript = 
                                         compiledScriptsCache.get(cacheKey);
-                                if(compiledScript==null) {
+                                if (compiledScript==null) {
                                     // TODO Charset ?
                                     fileReader = new BufferedReader(new FileReader(scriptFile),

                                             (int)scriptFile.length()); 
@@ -217,11 +217,11 @@ public abstract class JSR223TestElement 
             if (supportsCompilable && !StringUtils.isEmpty(cacheKey)) {
                 CompiledScript compiledScript = 
                         compiledScriptsCache.get(cacheKey);
-                if(compiledScript==null) {
+                if (compiledScript==null) {
                     synchronized (compiledScriptsCache) {
                         compiledScript = 
                                 compiledScriptsCache.get(cacheKey);
-                        if(compiledScript==null) {
+                        if (compiledScript==null) {
                             compiledScript = 
                                     ((Compilable) scriptEngine).compile(getScript());
                             compiledScriptsCache.put(cacheKey, compiledScript);



Mime
View raw message