You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/04/01 18:29:22 UTC

[jira] [Commented] (TAP5-2128) @Import leads to StringIndexOutOfBoundsException

    [ https://issues.apache.org/jira/browse/TAP5-2128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13956723#comment-13956723 ] 

ASF subversion and git services commented on TAP5-2128:
-------------------------------------------------------

Commit 91e8513644271bf381ee13fe02f9a0c59217a630 in tapestry-5's branch refs/heads/master from [~hlship]
[ https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;h=91e8513 ]

TAP5-2128: @Import leads to StringIndexOutOfBoundsException


> @Import leads to StringIndexOutOfBoundsException
> ------------------------------------------------
>
>                 Key: TAP5-2128
>                 URL: https://issues.apache.org/jira/browse/TAP5-2128
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.4
>            Reporter: Valery Barysok
>            Assignee: Howard M. Lewis Ship
>            Priority: Minor
>
> class org.apache.tapestry5.internal.services.ClasspathAssetAliasManagerImpl contains method extractAssetAlias with
>             if (resourcePath.startsWith(pathPrefix))
>             {
>                 // Prevent matching path prefix "foo" against "foobar" ... it must match against "foo/".
>                 if (resourcePath.charAt(pathPrefix.length()) != '/')
>                 {
>                     continue;
>                 }
> this code don't check when resourcePath.equals(pathPrefix) is true. In this case we get 
> Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 20
> To reproduce it just do next:
> @Import(library = InternalConstants.CORE_LIBRARY)
> public class Index {
> }



--
This message was sent by Atlassian JIRA
(v6.2#6252)