You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "James McIntosh (Created) (JIRA)" <ji...@apache.org> on 2012/04/12 02:47:13 UTC

[jira] [Created] (WICKET-4493) Unwrapped IllegalArgumentException in WicketURLDecoder

Unwrapped IllegalArgumentException in WicketURLDecoder
------------------------------------------------------

                 Key: WICKET-4493
                 URL: https://issues.apache.org/jira/browse/WICKET-4493
             Project: Wicket
          Issue Type: Task
          Components: wicket
    Affects Versions: 1.4.19
            Reporter: James McIntosh


In the class: org.apache.wicket.protocol.http.WicketURLDecoder there are two IllegalArgumentException which should be wrapped in WicketRuntimeException

Wrapping them would be good for consistency and help manage runtime exceptions.

These are the two exceptions, lines 164 and 179:

throw new IllegalArgumentException("URLDecoder: Incomplete trailing escape (%) pattern");
throw new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - " + e.getMessage());

e.g.

throw new WicketRuntimeException(new IllegalArgumentException("URLDecoder: Incomplete trailing escape (%) pattern"));
throw new WicketRuntimeException(new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - " + e.getMessage()));

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4493) Unwrapped IllegalArgumentException in WicketURLDecoder

Posted by "Johan Heylen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470078#comment-13470078 ] 

Johan Heylen commented on WICKET-4493:
--------------------------------------

See https://issues.apache.org/jira/browse/WICKET-4803 for a ticket with a quickstart which demonstrates the issue
                
> Unwrapped IllegalArgumentException in WicketURLDecoder
> ------------------------------------------------------
>
>                 Key: WICKET-4493
>                 URL: https://issues.apache.org/jira/browse/WICKET-4493
>             Project: Wicket
>          Issue Type: Task
>          Components: wicket
>    Affects Versions: 1.4.19
>            Reporter: James McIntosh
>            Priority: Minor
>
> In the class: org.apache.wicket.protocol.http.WicketURLDecoder there are two IllegalArgumentException which should be wrapped in WicketRuntimeException
> Wrapping them would be good for consistency and help manage runtime exceptions.
> These are the two exceptions, lines 164 and 179:
> throw new IllegalArgumentException("URLDecoder: Incomplete trailing escape (%) pattern");
> throw new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - " + e.getMessage());
> e.g.
> throw new WicketRuntimeException(new IllegalArgumentException("URLDecoder: Incomplete trailing escape (%) pattern"));
> throw new WicketRuntimeException(new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - " + e.getMessage()));
> Other similar runtime exceptions found:
> org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest
> Lines 106, 114
> throw new IllegalArgumentException("argument maxSize must be not null");
> throw new IllegalStateException("ServletRequest does not contain multipart content. One possible solution is to explicitly call Form.setMultipart(true), Wicket tries its best to auto-detect multipart forms but there are certain situation where it cannot.");

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4493) Unwrapped IllegalArgumentException in WicketURLDecoder

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468445#comment-13468445 ] 

Martin Grigorov commented on WICKET-4493:
-----------------------------------------

Please create a separate ticket with a quickstart.
                
> Unwrapped IllegalArgumentException in WicketURLDecoder
> ------------------------------------------------------
>
>                 Key: WICKET-4493
>                 URL: https://issues.apache.org/jira/browse/WICKET-4493
>             Project: Wicket
>          Issue Type: Task
>          Components: wicket
>    Affects Versions: 1.4.19
>            Reporter: James McIntosh
>            Priority: Minor
>
> In the class: org.apache.wicket.protocol.http.WicketURLDecoder there are two IllegalArgumentException which should be wrapped in WicketRuntimeException
> Wrapping them would be good for consistency and help manage runtime exceptions.
> These are the two exceptions, lines 164 and 179:
> throw new IllegalArgumentException("URLDecoder: Incomplete trailing escape (%) pattern");
> throw new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - " + e.getMessage());
> e.g.
> throw new WicketRuntimeException(new IllegalArgumentException("URLDecoder: Incomplete trailing escape (%) pattern"));
> throw new WicketRuntimeException(new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - " + e.getMessage()));
> Other similar runtime exceptions found:
> org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest
> Lines 106, 114
> throw new IllegalArgumentException("argument maxSize must be not null");
> throw new IllegalStateException("ServletRequest does not contain multipart content. One possible solution is to explicitly call Form.setMultipart(true), Wicket tries its best to auto-detect multipart forms but there are certain situation where it cannot.");

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4493) Unwrapped IllegalArgumentException in WicketURLDecoder

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468429#comment-13468429 ] 

Martin Grigorov commented on WICKET-4493:
-----------------------------------------

Hi Johan,

Here is the code in Wicket related to your question:

                        if (IExceptionSettings.SHOW_EXCEPTION_PAGE.equals(unexpectedExceptionDisplay))
			{
				Page currentPage = extractCurrentPage();
				return createPageRequestHandler(new PageProvider(new ExceptionErrorPage(e,
					currentPage)));
			}
			else if (IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE.equals(unexpectedExceptionDisplay))
			{
				return createPageRequestHandler(new PageProvider(
					application.getApplicationSettings().getInternalErrorPage()));
			}
			else
			{
				// IExceptionSettings.SHOW_NO_EXCEPTION_PAGE
				return new ErrorCodeRequestHandler(500);
			}

About my comment that the reported issue is not a problem in 1.5+ - the code in 1.5/6.x is improved since 1.4.x. See class org.apache.wicket.request.UrlDecoder.
                
> Unwrapped IllegalArgumentException in WicketURLDecoder
> ------------------------------------------------------
>
>                 Key: WICKET-4493
>                 URL: https://issues.apache.org/jira/browse/WICKET-4493
>             Project: Wicket
>          Issue Type: Task
>          Components: wicket
>    Affects Versions: 1.4.19
>            Reporter: James McIntosh
>            Priority: Minor
>
> In the class: org.apache.wicket.protocol.http.WicketURLDecoder there are two IllegalArgumentException which should be wrapped in WicketRuntimeException
> Wrapping them would be good for consistency and help manage runtime exceptions.
> These are the two exceptions, lines 164 and 179:
> throw new IllegalArgumentException("URLDecoder: Incomplete trailing escape (%) pattern");
> throw new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - " + e.getMessage());
> e.g.
> throw new WicketRuntimeException(new IllegalArgumentException("URLDecoder: Incomplete trailing escape (%) pattern"));
> throw new WicketRuntimeException(new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - " + e.getMessage()));
> Other similar runtime exceptions found:
> org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest
> Lines 106, 114
> throw new IllegalArgumentException("argument maxSize must be not null");
> throw new IllegalStateException("ServletRequest does not contain multipart content. One possible solution is to explicitly call Form.setMultipart(true), Wicket tries its best to auto-detect multipart forms but there are certain situation where it cannot.");

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (WICKET-4493) Unwrapped IllegalArgumentException in WicketURLDecoder

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468429#comment-13468429 ] 

Martin Grigorov edited comment on WICKET-4493 at 10/3/12 7:58 PM:
------------------------------------------------------------------

Hi Johan,

Here is the code in Wicket related to your question:

if (IExceptionSettings.SHOW_EXCEPTION_PAGE.equals(unexpectedExceptionDisplay))
			{
				Page currentPage = extractCurrentPage();
				return createPageRequestHandler(new PageProvider(new ExceptionErrorPage(e,
					currentPage)));
			}
			else if (IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE.equals(unexpectedExceptionDisplay))
			{
				return createPageRequestHandler(new PageProvider(
					application.getApplicationSettings().getInternalErrorPage()));
			}
			else
			{
				// IExceptionSettings.SHOW_NO_EXCEPTION_PAGE
				return new ErrorCodeRequestHandler(500);
			}

About my comment that the reported issue is not a problem in 1.5+ - the code in 1.5/6.x is improved since 1.4.x. See class org.apache.wicket.request.UrlDecoder.
                
      was (Author: mgrigorov):
    Hi Johan,

Here is the code in Wicket related to your question:

                        if (IExceptionSettings.SHOW_EXCEPTION_PAGE.equals(unexpectedExceptionDisplay))
			{
				Page currentPage = extractCurrentPage();
				return createPageRequestHandler(new PageProvider(new ExceptionErrorPage(e,
					currentPage)));
			}
			else if (IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE.equals(unexpectedExceptionDisplay))
			{
				return createPageRequestHandler(new PageProvider(
					application.getApplicationSettings().getInternalErrorPage()));
			}
			else
			{
				// IExceptionSettings.SHOW_NO_EXCEPTION_PAGE
				return new ErrorCodeRequestHandler(500);
			}

About my comment that the reported issue is not a problem in 1.5+ - the code in 1.5/6.x is improved since 1.4.x. See class org.apache.wicket.request.UrlDecoder.
                  
> Unwrapped IllegalArgumentException in WicketURLDecoder
> ------------------------------------------------------
>
>                 Key: WICKET-4493
>                 URL: https://issues.apache.org/jira/browse/WICKET-4493
>             Project: Wicket
>          Issue Type: Task
>          Components: wicket
>    Affects Versions: 1.4.19
>            Reporter: James McIntosh
>            Priority: Minor
>
> In the class: org.apache.wicket.protocol.http.WicketURLDecoder there are two IllegalArgumentException which should be wrapped in WicketRuntimeException
> Wrapping them would be good for consistency and help manage runtime exceptions.
> These are the two exceptions, lines 164 and 179:
> throw new IllegalArgumentException("URLDecoder: Incomplete trailing escape (%) pattern");
> throw new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - " + e.getMessage());
> e.g.
> throw new WicketRuntimeException(new IllegalArgumentException("URLDecoder: Incomplete trailing escape (%) pattern"));
> throw new WicketRuntimeException(new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - " + e.getMessage()));
> Other similar runtime exceptions found:
> org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest
> Lines 106, 114
> throw new IllegalArgumentException("argument maxSize must be not null");
> throw new IllegalStateException("ServletRequest does not contain multipart content. One possible solution is to explicitly call Form.setMultipart(true), Wicket tries its best to auto-detect multipart forms but there are certain situation where it cannot.");

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (WICKET-4493) Unwrapped IllegalArgumentException in WicketURLDecoder

Posted by "Martin Grigorov (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4493?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-4493.
-------------------------------------

    Resolution: Won't Fix

There is no such issue in 1.5.x.
1.4.x receives only security related fixes.
                
> Unwrapped IllegalArgumentException in WicketURLDecoder
> ------------------------------------------------------
>
>                 Key: WICKET-4493
>                 URL: https://issues.apache.org/jira/browse/WICKET-4493
>             Project: Wicket
>          Issue Type: Task
>          Components: wicket
>    Affects Versions: 1.4.19
>            Reporter: James McIntosh
>            Priority: Minor
>
> In the class: org.apache.wicket.protocol.http.WicketURLDecoder there are two IllegalArgumentException which should be wrapped in WicketRuntimeException
> Wrapping them would be good for consistency and help manage runtime exceptions.
> These are the two exceptions, lines 164 and 179:
> throw new IllegalArgumentException("URLDecoder: Incomplete trailing escape (%) pattern");
> throw new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - " + e.getMessage());
> e.g.
> throw new WicketRuntimeException(new IllegalArgumentException("URLDecoder: Incomplete trailing escape (%) pattern"));
> throw new WicketRuntimeException(new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - " + e.getMessage()));
> Other similar runtime exceptions found:
> org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest
> Lines 106, 114
> throw new IllegalArgumentException("argument maxSize must be not null");
> throw new IllegalStateException("ServletRequest does not contain multipart content. One possible solution is to explicitly call Form.setMultipart(true), Wicket tries its best to auto-detect multipart forms but there are certain situation where it cannot.");

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4493) Unwrapped IllegalArgumentException in WicketURLDecoder

Posted by "Johan Heylen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468438#comment-13468438 ] 

Johan Heylen commented on WICKET-4493:
--------------------------------------

Hi Martin,

I checked out that part, but the DefaultExceptionMapper never handles the IllegalArgumentException (an unchecked exception) thrown by the URL Decoder, therefor this cascades back to the servlet container which responds with an Internal Server error Response. The ExceptionSettings are never consulted, neither are any RequestCycleListenes we added?

Any advice on how to handle a URL with an invalid % construction only in Wicket?
                
> Unwrapped IllegalArgumentException in WicketURLDecoder
> ------------------------------------------------------
>
>                 Key: WICKET-4493
>                 URL: https://issues.apache.org/jira/browse/WICKET-4493
>             Project: Wicket
>          Issue Type: Task
>          Components: wicket
>    Affects Versions: 1.4.19
>            Reporter: James McIntosh
>            Priority: Minor
>
> In the class: org.apache.wicket.protocol.http.WicketURLDecoder there are two IllegalArgumentException which should be wrapped in WicketRuntimeException
> Wrapping them would be good for consistency and help manage runtime exceptions.
> These are the two exceptions, lines 164 and 179:
> throw new IllegalArgumentException("URLDecoder: Incomplete trailing escape (%) pattern");
> throw new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - " + e.getMessage());
> e.g.
> throw new WicketRuntimeException(new IllegalArgumentException("URLDecoder: Incomplete trailing escape (%) pattern"));
> throw new WicketRuntimeException(new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - " + e.getMessage()));
> Other similar runtime exceptions found:
> org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest
> Lines 106, 114
> throw new IllegalArgumentException("argument maxSize must be not null");
> throw new IllegalStateException("ServletRequest does not contain multipart content. One possible solution is to explicitly call Form.setMultipart(true), Wicket tries its best to auto-detect multipart forms but there are certain situation where it cannot.");

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4493) Unwrapped IllegalArgumentException in WicketURLDecoder

Posted by "Johan Heylen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468409#comment-13468409 ] 

Johan Heylen commented on WICKET-4493:
--------------------------------------

Martin, sorry for commenting on a closed issue,

can you elaborate your comment about this not being an issue in 1.5.x?

If I use a page param with a wrong usage of the % sign which yields into a IllegalArgumentException, this resolves in a http 500 error and my servlet container (jetty,tomcat) uses the web.xml configured     
<error-page>
  <error-code>500</error-code>
  <location>...</location>
</error-page>

Or should I use the getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE) to let Wicket handle the exception?
                
> Unwrapped IllegalArgumentException in WicketURLDecoder
> ------------------------------------------------------
>
>                 Key: WICKET-4493
>                 URL: https://issues.apache.org/jira/browse/WICKET-4493
>             Project: Wicket
>          Issue Type: Task
>          Components: wicket
>    Affects Versions: 1.4.19
>            Reporter: James McIntosh
>            Priority: Minor
>
> In the class: org.apache.wicket.protocol.http.WicketURLDecoder there are two IllegalArgumentException which should be wrapped in WicketRuntimeException
> Wrapping them would be good for consistency and help manage runtime exceptions.
> These are the two exceptions, lines 164 and 179:
> throw new IllegalArgumentException("URLDecoder: Incomplete trailing escape (%) pattern");
> throw new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - " + e.getMessage());
> e.g.
> throw new WicketRuntimeException(new IllegalArgumentException("URLDecoder: Incomplete trailing escape (%) pattern"));
> throw new WicketRuntimeException(new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - " + e.getMessage()));
> Other similar runtime exceptions found:
> org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest
> Lines 106, 114
> throw new IllegalArgumentException("argument maxSize must be not null");
> throw new IllegalStateException("ServletRequest does not contain multipart content. One possible solution is to explicitly call Form.setMultipart(true), Wicket tries its best to auto-detect multipart forms but there are certain situation where it cannot.");

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WICKET-4493) Unwrapped IllegalArgumentException in WicketURLDecoder

Posted by "James McIntosh (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4493?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James McIntosh updated WICKET-4493:
-----------------------------------

    Priority: Minor  (was: Major)
    
> Unwrapped IllegalArgumentException in WicketURLDecoder
> ------------------------------------------------------
>
>                 Key: WICKET-4493
>                 URL: https://issues.apache.org/jira/browse/WICKET-4493
>             Project: Wicket
>          Issue Type: Task
>          Components: wicket
>    Affects Versions: 1.4.19
>            Reporter: James McIntosh
>            Priority: Minor
>
> In the class: org.apache.wicket.protocol.http.WicketURLDecoder there are two IllegalArgumentException which should be wrapped in WicketRuntimeException
> Wrapping them would be good for consistency and help manage runtime exceptions.
> These are the two exceptions, lines 164 and 179:
> throw new IllegalArgumentException("URLDecoder: Incomplete trailing escape (%) pattern");
> throw new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - " + e.getMessage());
> e.g.
> throw new WicketRuntimeException(new IllegalArgumentException("URLDecoder: Incomplete trailing escape (%) pattern"));
> throw new WicketRuntimeException(new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - " + e.getMessage()));

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WICKET-4493) Unwrapped IllegalArgumentException in WicketURLDecoder

Posted by "James McIntosh (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4493?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James McIntosh updated WICKET-4493:
-----------------------------------

    Description: 
In the class: org.apache.wicket.protocol.http.WicketURLDecoder there are two IllegalArgumentException which should be wrapped in WicketRuntimeException

Wrapping them would be good for consistency and help manage runtime exceptions.

These are the two exceptions, lines 164 and 179:

throw new IllegalArgumentException("URLDecoder: Incomplete trailing escape (%) pattern");
throw new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - " + e.getMessage());

e.g.

throw new WicketRuntimeException(new IllegalArgumentException("URLDecoder: Incomplete trailing escape (%) pattern"));
throw new WicketRuntimeException(new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - " + e.getMessage()));

Other similar runtime exceptions found:

org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest

Lines 106, 114
throw new IllegalArgumentException("argument maxSize must be not null");
throw new IllegalStateException("ServletRequest does not contain multipart content. One possible solution is to explicitly call Form.setMultipart(true), Wicket tries its best to auto-detect multipart forms but there are certain situation where it cannot.");


  was:
In the class: org.apache.wicket.protocol.http.WicketURLDecoder there are two IllegalArgumentException which should be wrapped in WicketRuntimeException

Wrapping them would be good for consistency and help manage runtime exceptions.

These are the two exceptions, lines 164 and 179:

throw new IllegalArgumentException("URLDecoder: Incomplete trailing escape (%) pattern");
throw new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - " + e.getMessage());

e.g.

throw new WicketRuntimeException(new IllegalArgumentException("URLDecoder: Incomplete trailing escape (%) pattern"));
throw new WicketRuntimeException(new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - " + e.getMessage()));

    
> Unwrapped IllegalArgumentException in WicketURLDecoder
> ------------------------------------------------------
>
>                 Key: WICKET-4493
>                 URL: https://issues.apache.org/jira/browse/WICKET-4493
>             Project: Wicket
>          Issue Type: Task
>          Components: wicket
>    Affects Versions: 1.4.19
>            Reporter: James McIntosh
>            Priority: Minor
>
> In the class: org.apache.wicket.protocol.http.WicketURLDecoder there are two IllegalArgumentException which should be wrapped in WicketRuntimeException
> Wrapping them would be good for consistency and help manage runtime exceptions.
> These are the two exceptions, lines 164 and 179:
> throw new IllegalArgumentException("URLDecoder: Incomplete trailing escape (%) pattern");
> throw new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - " + e.getMessage());
> e.g.
> throw new WicketRuntimeException(new IllegalArgumentException("URLDecoder: Incomplete trailing escape (%) pattern"));
> throw new WicketRuntimeException(new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - " + e.getMessage()));
> Other similar runtime exceptions found:
> org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest
> Lines 106, 114
> throw new IllegalArgumentException("argument maxSize must be not null");
> throw new IllegalStateException("ServletRequest does not contain multipart content. One possible solution is to explicitly call Form.setMultipart(true), Wicket tries its best to auto-detect multipart forms but there are certain situation where it cannot.");

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira