Valery Barysok created TAP5-2128:
------------------------------------

             Summary: @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


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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to