[jira] [Commented] (SLING-8335) StringIndexOutOfBoundsException from resolver.map with non absolute path

2019-04-02 Thread Ashok Kumar (JIRA)


[ 
https://issues.apache.org/jira/browse/SLING-8335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16808346#comment-16808346
 ] 

Ashok Kumar commented on SLING-8335:


[~kpauls], [~rombert] , please review the PR - and merge - 
[https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/12] 

> StringIndexOutOfBoundsException from resolver.map with non absolute path
> 
>
> Key: SLING-8335
> URL: https://issues.apache.org/jira/browse/SLING-8335
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.6.8
>Reporter: Ashok Kumar
>Priority: Major
> Attachments: StringIndexOutofBounds.patch
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> ResourceResolver.map("content/we-retail/us/en”) - Forward Mapping
> Steps to Reproduce : 
> 1. go to /system/console/jcrresolver console
> 2. input "content/we-retail/us/en" in Test
> 3. click map
> Output 
> it give out the error message -: java.lang.StringIndexOutOfBoundsException: 
> String index out of range: -1
>  
> [https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/master/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java#L770]
> {quote}final String pathInfo = absPath.substring(path.length());
> {quote}
> path = "/content/we-retail/us/en" whereas absPath = "content/we-retail/us/en" 
>    substring fails
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SLING-8335) StringIndexOutOfBoundsException from resolver.map with non absolute path

2019-04-01 Thread Ashok Kumar (JIRA)


[ 
https://issues.apache.org/jira/browse/SLING-8335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16806435#comment-16806435
 ] 

Ashok Kumar commented on SLING-8335:


[~rombert] Created the PR - 
[https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/12] . 
Thanks

> StringIndexOutOfBoundsException from resolver.map with non absolute path
> 
>
> Key: SLING-8335
> URL: https://issues.apache.org/jira/browse/SLING-8335
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.6.8
>Reporter: Ashok Kumar
>Priority: Major
> Attachments: StringIndexOutofBounds.patch
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> ResourceResolver.map("content/we-retail/us/en”) - Forward Mapping
> Steps to Reproduce : 
> 1. go to /system/console/jcrresolver console
> 2. input "content/we-retail/us/en" in Test
> 3. click map
> Output 
> it give out the error message -: java.lang.StringIndexOutOfBoundsException: 
> String index out of range: -1
>  
> [https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/master/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java#L770]
> {quote}final String pathInfo = absPath.substring(path.length());
> {quote}
> path = "/content/we-retail/us/en" whereas absPath = "content/we-retail/us/en" 
>    substring fails
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SLING-8335) StringIndexOutOfBoundsException from resolver.map with non absolute path

2019-03-29 Thread Robert Munteanu (JIRA)


[ 
https://issues.apache.org/jira/browse/SLING-8335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16805167#comment-16805167
 ] 

Robert Munteanu commented on SLING-8335:


Thanks for the patch [~ashokpanghal] . Can you please open a PR with this so we 
can get Jenkins checks running and maybe involve more people in the review?

> StringIndexOutOfBoundsException from resolver.map with non absolute path
> 
>
> Key: SLING-8335
> URL: https://issues.apache.org/jira/browse/SLING-8335
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.6.8
>Reporter: Ashok Kumar
>Priority: Major
> Attachments: StringIndexOutofBounds.patch
>
>
> ResourceResolver.map("content/we-retail/us/en”) - Forward Mapping
> Steps to Reproduce : 
> 1. go to /system/console/jcrresolver console
> 2. input "content/we-retail/us/en" in Test
> 3. click map
> Output 
> it give out the error message -: java.lang.StringIndexOutOfBoundsException: 
> String index out of range: -1
>  
> [https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/master/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java#L770]
> {quote}final String pathInfo = absPath.substring(path.length());
> {quote}
> path = "/content/we-retail/us/en" whereas absPath = "content/we-retail/us/en" 
>    substring fails
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SLING-8335) StringIndexOutOfBoundsException from resolver.map with non absolute path

2019-03-29 Thread Ashok Kumar (JIRA)


[ 
https://issues.apache.org/jira/browse/SLING-8335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16804815#comment-16804815
 ] 

Ashok Kumar commented on SLING-8335:


Attached patch has a localised fix as I am not sure if it should be a check 
right at the top of the method resolveInternal which expects absPath as 
parameter.

> StringIndexOutOfBoundsException from resolver.map with non absolute path
> 
>
> Key: SLING-8335
> URL: https://issues.apache.org/jira/browse/SLING-8335
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.6.8
>Reporter: Ashok Kumar
>Priority: Major
> Attachments: StringIndexOutofBounds.patch
>
>
> ResourceResolver.map("content/we-retail/us/en”) - Forward Mapping
> Steps to Reproduce : 
> 1. go to /system/console/jcrresolver console
> 2. input "content/we-retail/us/en" in Test
> 3. click map
> Output 
> it give out the error message -: java.lang.StringIndexOutOfBoundsException: 
> String index out of range: -1
>  
> [https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/master/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java#L770]
> {quote}final String pathInfo = absPath.substring(path.length());
> {quote}
> path = "/content/we-retail/us/en" whereas absPath = "content/we-retail/us/en" 
>    substring fails
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)