You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by eh...@apache.org on 2007/05/30 00:29:02 UTC

svn commit: r542680 - /incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java

Author: ehillenius
Date: Tue May 29 15:29:00 2007
New Revision: 542680

URL: http://svn.apache.org/viewvc?view=rev&rev=542680
Log:
extra length check

Modified:
    incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java

Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java?view=diff&rev=542680&r1=542679&r2=542680
==============================================================================
--- incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java (original)
+++ incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java Tue May 29 15:29:00 2007
@@ -172,7 +172,11 @@
 		// others arent
 		if (servletPath.endsWith(path))
 		{
-			wicketPath = servletPath.substring(0, servletPath.length() - path.length() - 1);
+			int len = servletPath.length() - path.length() - 1;
+			if (len > -1)
+			{
+				wicketPath = servletPath.substring(0, len);
+			}
 		}
 		// We're running as a servlet
 		else