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 2017/02/18 21:41:37 UTC
svn commit: r1783594 -
/jmeter/trunk/src/core/org/apache/jmeter/util/XPathUtil.java
Author: pmouawad
Date: Sat Feb 18 21:41:36 2017
New Revision: 1783594
URL: http://svn.apache.org/viewvc?rev=1783594&view=rev
Log:
Fix sonar error
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=1783594&r1=1783593&r2=1783594&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 18 21:41:36 2017
@@ -419,7 +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 || nodeList == null) {
+ // length == 0 means nodelist is null
+ if (len == 0) {
log.debug("nodeList is null or empty. No match by xpath expression: {}", xPathExpression);
result.setFailure(!isNegated);
result.setFailureMessage("No Nodes Matched " + xPathExpression);