Author: sebb
Date: Sun Jan 21 15:29:17 2007
New Revision: 498490

URL: http://svn.apache.org/viewvc?view=rev&rev=498490
Log:
Bug 34261 - NPE in HtmlParser (allow for missing attributes)

Modified:
    
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/parser/HtmlParserHTMLParser.java
    jakarta/jmeter/branches/rel-2-2/xdocs/changes.xml

Modified: 
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/parser/HtmlParserHTMLParser.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/parser/HtmlParserHTMLParser.java?view=diff&rev=498490&r1=498489&r2=498490
==============================================================================
--- 
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/parser/HtmlParserHTMLParser.java
 (original)
+++ 
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/parser/HtmlParserHTMLParser.java
 Sun Jan 21 15:29:17 2007
@@ -143,7 +143,7 @@
                                        InputTag input = (InputTag) node;
                                        // we check the input tag type for image
                                        String strType = 
input.getAttribute(ATT_TYPE);
-                                       if (strType != null && 
strType.equalsIgnoreCase(ATT_IS_IMAGE)) {
+                                       if 
(ATT_IS_IMAGE.equalsIgnoreCase(strType)) {
                                                // then we need to download the 
binary
                                                binUrlStr = 
input.getAttribute(ATT_SRC);
                                        }
@@ -161,7 +161,7 @@
                                        binUrlStr = tag.getAttribute(ATT_SRC);
                                } else if (node instanceof LinkTagTag) {
                                        LinkTagTag script = (LinkTagTag) node;
-                                       if 
(script.getAttribute(ATT_REL).equalsIgnoreCase(STYLESHEET)) {
+                                       if 
(STYLESHEET.equalsIgnoreCase(script.getAttribute(ATT_REL))) {
                                                binUrlStr = 
script.getAttribute(ATT_HREF);
                                        }
                                } else if (node instanceof FrameTag) {

Modified: jakarta/jmeter/branches/rel-2-2/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/branches/rel-2-2/xdocs/changes.xml?view=diff&rev=498490&r1=498489&r2=498490
==============================================================================
--- jakarta/jmeter/branches/rel-2-2/xdocs/changes.xml (original)
+++ jakarta/jmeter/branches/rel-2-2/xdocs/changes.xml Sun Jan 21 15:29:17 2007
@@ -69,6 +69,7 @@
 <li>Bug 41277 - add Latency and Encoding to CSV output</li>
 <li>Bug 41414 - Mac OS X may add extra item to -jar classpath</li>
 <li>Fix NPE when saving thread counts in remote testing</li>
+<li>Bug 34261 - NPE in HtmlParser (allow for missing attributes)</li>
 </ul>
 
 <h3>Version 2.2</h3>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to