[ 
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

        

Reply via email to