jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1380337 - /jmeter/trunk/src/components/org/apache/jmeter/assertions/XMLSchemaAssertion.java
Date Mon, 03 Sep 2012 20:09:10 GMT
Author: pmouawad
Date: Mon Sep  3 20:09:10 2012
New Revision: 1380337

URL: http://svn.apache.org/viewvc?rev=1380337&view=rev
Log:
Add final to field
Add logger.isDebugEnabled

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/assertions/XMLSchemaAssertion.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/assertions/XMLSchemaAssertion.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/assertions/XMLSchemaAssertion.java?rev=1380337&r1=1380336&r2=1380337&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/assertions/XMLSchemaAssertion.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/assertions/XMLSchemaAssertion.java Mon Sep
 3 20:09:10 2012
@@ -163,7 +163,7 @@ public class XMLSchemaAssertion extends 
      * SAXErrorHandler class
      */
     private static class SAXErrorHandler implements ErrorHandler {
-        private AssertionResult result;
+        private final AssertionResult result;
 
         public SAXErrorHandler(AssertionResult result) {
             this.result = result;
@@ -175,7 +175,9 @@ public class XMLSchemaAssertion extends 
         public void error(SAXParseException exception) throws SAXParseException {
 
             String msg = "error: " + errorDetails(exception);
-            log.debug(msg);
+            if(log.isDebugEnabled()) {
+                log.debug(msg);
+            }
             result.setFailureMessage(msg);
             result.setError(true);
             throw exception;
@@ -188,7 +190,9 @@ public class XMLSchemaAssertion extends 
         public void fatalError(SAXParseException exception) throws SAXParseException {
 
             String msg = "fatal: " + errorDetails(exception);
-            log.debug(msg);
+            if(log.isDebugEnabled()) {
+                log.debug(msg);
+            }
             result.setFailureMessage(msg);
             result.setError(true);
             throw exception;
@@ -200,7 +204,9 @@ public class XMLSchemaAssertion extends 
         public void warning(SAXParseException exception) throws SAXParseException {
 
             String msg = "warning: " + errorDetails(exception);
-            log.debug(msg);
+            if(log.isDebugEnabled()) {
+                log.debug(msg);
+            }
             result.setFailureMessage(msg);
             // result.setError(true); // TODO is this the correct strategy?
             // throw exception; // allow assertion to pass



Mime
View raw message