[jira] [Commented] (MYFACES-4107) StringIndexOutOfBoundsException in getResourceVersion

2017-04-07 Thread Paul Nicolucci (JIRA)

[ 
https://issues.apache.org/jira/browse/MYFACES-4107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15960882#comment-15960882
 ] 

Paul Nicolucci commented on MYFACES-4107:
-

Bill, this looks good to me as well.

> StringIndexOutOfBoundsException in getResourceVersion
> -
>
> Key: MYFACES-4107
> URL: https://issues.apache.org/jira/browse/MYFACES-4107
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.24, 2.1.18, 2.2.12
> Environment: WebSphere Liberty
>Reporter: Bill Lucy
>Assignee: Bill Lucy
>Priority: Minor
> Attachments: MYFACES-4107.patch
>
>
> I've run into a case where, given an incorrect context parameter, a 
> StringIndexOutOfBoundsException is thrown.  This occurs in WebSphere Liberty 
> because the server normalizes the external context resource paths during app 
> initialization.
> For example, this parameter:
> 
>javax.faces.WEBAPP_RESOURCES_DIRECTORY
>/META-INF/resources
> 
> throws:
> java.lang.StringIndexOutOfBoundsException: String index out of  range: 35
> at java.lang.String.substring(String.java:1377)
> at 
> org.apache.myfaces.shared.resource.ExternalContextResourceLoader.getResourceVersion(ExternalContextResourceLoader.java:81)
> That parameter value is not allowed to have a leading slash.  However, the 
> current exception is not very helpful, and can be easily avoided.  
> I'll attach a patch which avoids the StringIndexOutOfBoundsException in 
> getResourceVersion(); we already have this logic in getLibraryVersion().



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MYFACES-4107) StringIndexOutOfBoundsException in getResourceVersion

2017-04-06 Thread Leonardo Uribe (JIRA)

[ 
https://issues.apache.org/jira/browse/MYFACES-4107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15959796#comment-15959796
 ] 

Leonardo Uribe commented on MYFACES-4107:
-

+1 the patch looks good

> StringIndexOutOfBoundsException in getResourceVersion
> -
>
> Key: MYFACES-4107
> URL: https://issues.apache.org/jira/browse/MYFACES-4107
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.24, 2.1.18, 2.2.12
> Environment: WebSphere Liberty
>Reporter: Bill Lucy
>Assignee: Bill Lucy
>Priority: Minor
> Attachments: MYFACES-4107.patch
>
>
> I've run into a case where, given an incorrect context parameter, a 
> StringIndexOutOfBoundsException is thrown.  This occurs in WebSphere Liberty 
> because the server normalizes the external context resource paths during app 
> initialization.
> For example, this parameter:
> 
>javax.faces.WEBAPP_RESOURCES_DIRECTORY
>/META-INF/resources
> 
> throws:
> java.lang.StringIndexOutOfBoundsException: String index out of  range: 35
> at java.lang.String.substring(String.java:1377)
> at 
> org.apache.myfaces.shared.resource.ExternalContextResourceLoader.getResourceVersion(ExternalContextResourceLoader.java:81)
> That parameter value is not allowed to have a leading slash.  However, the 
> current exception is not very helpful, and can be easily avoided.  
> I'll attach a patch which avoids the StringIndexOutOfBoundsException in 
> getResourceVersion(); we already have this logic in getLibraryVersion().



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MYFACES-4107) StringIndexOutOfBoundsException in getResourceVersion

2017-04-06 Thread Bill Lucy (JIRA)

[ 
https://issues.apache.org/jira/browse/MYFACES-4107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15959547#comment-15959547
 ] 

Bill Lucy commented on MYFACES-4107:


If no one has any issues with the patch, I'll commit it tomorrow.

> StringIndexOutOfBoundsException in getResourceVersion
> -
>
> Key: MYFACES-4107
> URL: https://issues.apache.org/jira/browse/MYFACES-4107
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.24, 2.1.18, 2.2.12
> Environment: WebSphere Liberty
>Reporter: Bill Lucy
>Assignee: Bill Lucy
>Priority: Minor
> Attachments: MYFACES-4107.patch
>
>
> I've run into a case where, given an incorrect context parameter, a 
> StringIndexOutOfBoundsException is thrown.  This occurs in WebSphere Liberty 
> because the server normalizes the external context resource paths during app 
> initialization.
> For example, this parameter:
> 
>javax.faces.WEBAPP_RESOURCES_DIRECTORY
>/META-INF/resources
> 
> throws:
> java.lang.StringIndexOutOfBoundsException: String index out of  range: 35
> at java.lang.String.substring(String.java:1377)
> at 
> org.apache.myfaces.shared.resource.ExternalContextResourceLoader.getResourceVersion(ExternalContextResourceLoader.java:81)
> That parameter value is not allowed to have a leading slash.  However, the 
> current exception is not very helpful, and can be easily avoided.  
> I'll attach a patch which avoids the StringIndexOutOfBoundsException in 
> getResourceVersion(); we already have this logic in getLibraryVersion().



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)