Author: jbq
Date: Sun Jun 10 13:40:56 2007
New Revision: 545937

URL: http://svn.apache.org/viewvc?view=rev&rev=545937
Log:
WICKET-293 PackageRequestTargetUrlCodingStrategy should interrupts the cycle 
and sends a 404 when a page/class cannot be found

Revert revision 537428 as any error during decode() is silently trapped. When a
404 needs to be sent decode() should handle the case properly and just return
null. We should not catch any exception assuming it means decode() did not find
an existing resource.

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

Modified: 
incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/request/WebRequestCodingStrategy.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/request/WebRequestCodingStrategy.java?view=diff&rev=545937&r1=545936&r2=545937
==============================================================================
--- 
incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/request/WebRequestCodingStrategy.java
 (original)
+++ 
incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/request/WebRequestCodingStrategy.java
 Sun Jun 10 13:40:56 2007
@@ -370,23 +370,7 @@
                {
                        return null;
                }
-               try
-               {
-                       return encoder.decode(requestParameters);
-               }
-               catch (WicketRuntimeException ex)
-               {
-                       if (log.isDebugEnabled())
-                       {
-                               log.debug(ex.toString());
-
-                               return new 
WebErrorCodeResponseTarget(HttpServletResponse.SC_NOT_FOUND,
-                                               "Unable to load Page: " + 
ex.toString());
-                       }
-
-                       return new 
WebErrorCodeResponseTarget(HttpServletResponse.SC_NOT_FOUND,
-                                       "Unable to load Page");
-               }
+               return encoder.decode(requestParameters);
        }
 
        /**


Reply via email to