You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by fs...@apache.org on 2017/02/11 13:13:06 UTC

svn commit: r1782602 - /jmeter/trunk/src/core/org/apache/jmeter/util/XPathUtil.java

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;