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 13:56:22 UTC

svn commit: r1783551 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/JTidyHTMLParser.java

Author: pmouawad
Date: Sat Feb 18 13:56:22 2017
New Revision: 1783551

URL: http://svn.apache.org/viewvc?rev=1783551&view=rev
Log:
Fix potential NPE

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/JTidyHTMLParser.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/JTidyHTMLParser.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/JTidyHTMLParser.java?rev=1783551&r1=1783550&r2=1783551&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/JTidyHTMLParser.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/JTidyHTMLParser.java Sat Feb 18 13:56:22 2017
@@ -133,12 +133,12 @@ class JTidyHTMLParser extends HTMLParser
             if (name.equalsIgnoreCase(TAG_INPUT)) {
                 String src = getValue(attrs, ATT_SRC);
                 String typ = getValue(attrs, ATT_TYPE);
-                if ((src != null) && (typ.equalsIgnoreCase(ATT_IS_IMAGE))) {
+                if ((src != null) && ATT_IS_IMAGE.equalsIgnoreCase(typ)) {
                     urls.addURL(src, baseUrl);
                 }
                 break;
             }
-            if (name.equalsIgnoreCase(TAG_LINK) && getValue(attrs, ATT_REL).equalsIgnoreCase(STYLESHEET)) {
+            if (TAG_LINK.equalsIgnoreCase(name) && STYLESHEET.equalsIgnoreCase(getValue(attrs, ATT_REL))) {
                 urls.addURL(getValue(attrs, ATT_HREF), baseUrl);
                 break;
             }