You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2016/12/28 22:52:53 UTC

svn commit: r1776352 - /jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/test/JavaTest.java

Author: pmouawad
Date: Wed Dec 28 22:52:53 2016
New Revision: 1776352

URL: http://svn.apache.org/viewvc?rev=1776352&view=rev
Log:
sonar: fix errors 

Modified:
    jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/test/JavaTest.java

Modified: jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/test/JavaTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/test/JavaTest.java?rev=1776352&r1=1776351&r2=1776352&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/test/JavaTest.java (original)
+++ jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/test/JavaTest.java Wed Dec 28 22:52:53 2016
@@ -173,7 +173,7 @@ public class JavaTest extends AbstractJa
 
         responseCode = context.getParameter(RESPONSE_CODE_NAME, RESPONSE_CODE_DEFAULT);
 
-        success = context.getParameter(SUCCESS_NAME, SUCCESS_DEFAULT).equalsIgnoreCase("OK");
+        success = "OK".equalsIgnoreCase(context.getParameter(SUCCESS_NAME, SUCCESS_DEFAULT));
 
         label = context.getParameter(LABEL_NAME, "");
         if (label.length() == 0) {
@@ -309,6 +309,7 @@ public class JavaTest extends AbstractJa
             }
             results.setSuccessful(success);
         } catch (InterruptedException e) {
+            Thread.currentThread().interrupt();
             LOG.warn("JavaTest: interrupted.");
             results.setSuccessful(false);
         } catch (Exception e) {