[ 
https://issues.apache.org/jira/browse/SLING-1916?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alexander Klimetschek updated SLING-1916:
-----------------------------------------

    Description: 
The JsonRendererServlet together with the ResourceTraversor use the 
RecursionTooDeepException in a wrong way: it sets the depth were it stopped as 
exception message, whereas the message is clearly defined to be the affected 
resource path instead by the javadocs. Also it leads to a unnecessary int to 
string conversion plus string to int parsing.

If there already is a very specific exception class, why not simply add the 
level as a member to the exception?

  was:
The JsonRendererServlet together with the ResourceTraversor use the 
RecursionTooDeepException in a wrong way: it sets the depth were it stopped as 
exception message, whereas the message is clearly defined to be the affected 
resource path instead. Also it leads to a unnecessary int to string conversion 
plus string to int parsing.

If there already is a very specific exceptions, why not simply add the level as 
a member to the exception?


> Json renderer servlet should use a new RecursionTooDeepException.getLevel() 
> instead of parsing the message
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-1916
>                 URL: https://issues.apache.org/jira/browse/SLING-1916
>             Project: Sling
>          Issue Type: Improvement
>          Components: Servlets
>    Affects Versions: Servlets Get 2.1.0
>            Reporter: Alexander Klimetschek
>            Priority: Minor
>
> The JsonRendererServlet together with the ResourceTraversor use the 
> RecursionTooDeepException in a wrong way: it sets the depth were it stopped 
> as exception message, whereas the message is clearly defined to be the 
> affected resource path instead by the javadocs. Also it leads to a 
> unnecessary int to string conversion plus string to int parsing.
> If there already is a very specific exception class, why not simply add the 
> level as a member to the exception?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to