khammond    01/09/27 23:01:15

  Modified:    src/org/apache/jmeter/protocol/http/config UrlConfig.java
  Log:
  Removed JDK1.3 method calls. This class is now JDK1.2 compatible.
  
  Revision  Changes    Path
  1.24      +16 -3     
jakarta-jmeter/src/org/apache/jmeter/protocol/http/config/UrlConfig.java
  
  Index: UrlConfig.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/org/apache/jmeter/protocol/http/config/UrlConfig.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- UrlConfig.java    2001/09/26 05:23:25     1.23
  +++ UrlConfig.java    2001/09/28 06:01:14     1.24
  @@ -66,8 +66,8 @@
    *  Apache Foundation
    *
    *@author     Michael Stover
  - *@created    $Date: 2001/09/26 05:23:25 $
  - *@version    $Revision: 1.23 $
  + *@created    $Date: 2001/09/28 06:01:14 $
  + *@version    $Revision: 1.24 $
    */
   
   public class UrlConfig extends AbstractConfigElement implements Serializable
  @@ -437,7 +437,20 @@
                        {
                                String name = args[i].substring(0,index);
                                String value = args[i].substring(index + 1);
  -                             addArgument(name, URLDecoder.decode(value));
  +
  +                             // In JDK 1.2, the decode() method has a throws clause:
  +                             // "throws Exception". In JDK 1.3, the method does not 
have
  +                             // a throws clause. So, in order to be JDK 1.2 
compliant,
  +                             // we need to add a try/catch around the method call.
  +                             try
  +                             {
  +                                     addArgument(name, URLDecoder.decode(value));
  +                             }
  +                             catch (Exception e)
  +                             {
  +                                     
System.out.println("UrlConfig:parseArguments(): Unable to parse argument=[" + value + 
"]");
  +                                     
System.out.println("UrlConfig:parseArguments(): queryString=[" + queryString + "]");
  +                             }
                        }
                }
        }
  
  
  

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

Reply via email to