jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1782602 - /jmeter/trunk/src/core/org/apache/jmeter/util/XPathUtil.java
Date Sat, 11 Feb 2017 13:13:06 GMT
Author: fschumacher
Date: Sat Feb 11 13:13:06 2017
New Revision: 1782602

URL: http://svn.apache.org/viewvc?rev=1782602&view=rev
Log:
Help java to see, that nodeList can't be null later. Rephrase log message.

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

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/XPathUtil.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/XPathUtil.java?rev=1782602&r1=1782601&r2=1782602&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/XPathUtil.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/XPathUtil.java Sat Feb 11 13:13:06 2017
@@ -419,8 +419,8 @@ public class XPathUtil {
                     NodeList nodeList = xObject.nodelist();
                     final int len = (nodeList != null) ? nodeList.getLength() : 0;
                     log.debug("nodeList length {}", len);
-                    if (len == 0) {
-                        log.debug("nodeList null no match by xpath expression: {}", xPathExpression);
+                    if (len == 0 || nodeList == null) {
+                        log.debug("nodeList is null or empty. No match by xpath expression:
{}", xPathExpression);
                         result.setFailure(!isNegated);
                         result.setFailureMessage("No Nodes Matched " + xPathExpression);
                         return;



Mime
View raw message