khammond 02/02/18 10:16:44
Modified: src/org/apache/jmeter/protocol/http/parser HtmlParser.java
Log:
Class was not JDK1.2 compatible because it did not catch "Exception" that
URLDecoder.decode() throws.
In JDK1.2, URLDecoder.decode() throws Exception. However, in JDK1.3, the method
does not have a throws clause.
Revision Changes Path
1.17 +15 -3
jakarta-jmeter/src/org/apache/jmeter/protocol/http/parser/HtmlParser.java
Index: HtmlParser.java
===================================================================
RCS file:
/home/cvs/jakarta-jmeter/src/org/apache/jmeter/protocol/http/parser/HtmlParser.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- HtmlParser.java 17 Feb 2002 21:33:36 -0000 1.16
+++ HtmlParser.java 18 Feb 2002 18:16:44 -0000 1.17
@@ -117,7 +117,19 @@
boolean ok = true;
Iterator iter = config.getArguments().iterator();
- String query = URLDecoder.decode(newLink.getQueryString());
+
+ // In JDK1.2, URLDecoder.decode has Exception in its throws clause.
However, it
+ // was removed in JDK1.3. Since JMeter is JDK1.2-compatible, we need
to catch
+ // Exception.
+ String query = null;
+ try
+ {
+ query = URLDecoder.decode(newLink.getQueryString());
+ }
+ catch (Exception e)
+ {
+ // do nothing. query will remain null.
+ }
if (query == null && config.getArguments().getArgumentCount() > 0)
{
@@ -378,9 +390,9 @@
/************************************************************
* !ToDo (Class description)
*
- *@author $Author: mstover1 $
- *@created $Date: 2002/02/17 21:33:36 $
- *@version $Revision: 1.16 $
+ *@author $Author: khammond $
+ *@created $Date: 2002/02/18 18:16:44 $
+ *@version $Revision: 1.17 $
***********************************************************/
public static class Test extends TestCase
{
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>