You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by vm...@apache.org on 2002/01/10 20:56:59 UTC
cvs commit: jakarta-cactus/src/framework/share/org/apache/cactus/server ServletUtil.java
vmassol 02/01/10 11:56:59
Modified: src/framework/share/org/apache/cactus/server
ServletUtil.java
Log:
now it compiles on JDK 1.2. Thanks to Balki.
Revision Changes Path
1.3 +11 -2 jakarta-cactus/src/framework/share/org/apache/cactus/server/ServletUtil.java
Index: ServletUtil.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/src/framework/share/org/apache/cactus/server/ServletUtil.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ServletUtil.java 4 Nov 2001 22:51:45 -0000 1.2
+++ ServletUtil.java 10 Jan 2002 19:56:59 -0000 1.3
@@ -54,6 +54,7 @@
package org.apache.cactus.server;
import org.apache.cactus.util.log.*;
+import org.apache.cactus.util.ChainedRuntimeException;
import org.apache.cactus.*;
import java.net.*;
@@ -63,7 +64,7 @@
*
* @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
*
- * @version $Id: ServletUtil.java,v 1.2 2001/11/04 22:51:45 vmassol Exp $
+ * @version $Id: ServletUtil.java,v 1.3 2002/01/10 19:56:59 vmassol Exp $
*/
public class ServletUtil
{
@@ -113,7 +114,15 @@
} else {
value = theQueryString.substring(startIndex);
}
- value = URLDecoder.decode(value);
+
+ // In JDK 1.2 URLDecoder.decode throws an Exception. This is not
+ // needed for JDK 1.3+ but needed to keep JDK 1.2.2 compatibility
+ try {
+ value = URLDecoder.decode(value);
+ } catch (Exception e) {
+ throw new ChainedRuntimeException("Error URL decoding [" +
+ value + "]", e);
+ }
}
return value;
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>