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:30:34 UTC

svn commit: r542682 - /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:30:34 2007
New Revision: 542682

URL: http://svn.apache.org/viewvc?view=rev&rev=542682
Log:
better 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=542682&r1=542681&r2=542682
==============================================================================
--- 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:30:34 2007
@@ -173,10 +173,11 @@
 		if (servletPath.endsWith(path))
 		{
 			int len = servletPath.length() - path.length() - 1;
-			if (len > -1)
+			if (len < 0)
 			{
-				wicketPath = servletPath.substring(0, len);
+				len = 0;
 			}
+			wicketPath = servletPath.substring(0, len);
 		}
 		// We're running as a servlet
 		else