Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
5.4
-
None
Description
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()) != '/')
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 {
}