jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1776763 - /jmeter/trunk/src/components/org/apache/jmeter/assertions/XMLSchemaAssertion.java
Date Sat, 31 Dec 2016 14:47:47 GMT
Author: pmouawad
Date: Sat Dec 31 14:47:47 2016
New Revision: 1776763

URL: http://svn.apache.org/viewvc?rev=1776763&view=rev
Log:
Sonar : fix squid:CommentedOutCodeLine "This block of commented-out lines of code should be
removed. "

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=1776763&r1=1776762&r2=1776763&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/assertions/XMLSchemaAssertion.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/assertions/XMLSchemaAssertion.java Sat Dec
31 14:47:47 2016
@@ -101,9 +101,6 @@ public class XMLSchemaAssertion extends
      */
     private void setSchemaResult(AssertionResult result, String xmlStr, String xsdFileName)
{
         try {
-            // boolean toReturn = true;
-
-            // Document doc = null;
             DocumentBuilderFactory parserFactory = DocumentBuilderFactory.newInstance();
             parserFactory.setValidating(true);
             parserFactory.setNamespaceAware(true);
@@ -113,8 +110,6 @@ public class XMLSchemaAssertion extends
             // create a parser:
             DocumentBuilder parser = parserFactory.newDocumentBuilder();
             parser.setErrorHandler(new SAXErrorHandler(result));
-
-            // doc =
             parser.parse(new InputSource(new StringReader(xmlStr)));
             // if everything went fine then xml schema validation is valid
         } catch (SAXParseException e) {
@@ -189,7 +184,6 @@ public class XMLSchemaAssertion extends
          */
         @Override
         public void fatalError(SAXParseException exception) throws SAXParseException {
-
             String msg = "fatal: " + errorDetails(exception);
             log.debug(msg);
             result.setFailureMessage(msg);
@@ -202,13 +196,9 @@ public class XMLSchemaAssertion extends
          */
         @Override
         public void warning(SAXParseException exception) throws SAXParseException {
-
             String msg = "warning: " + errorDetails(exception);
             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