You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org> on 2013/05/29 19:42:20 UTC

[jira] [Updated] (TAP5-2120) StringIndexOutOfBoundsException computing relative paths for certain Resources

     [ https://issues.apache.org/jira/browse/TAP5-2120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAP5-2120:
---------------------------------------

    Summary: StringIndexOutOfBoundsException computing relative paths for certain Resources  (was: StringIndexOutOfBoundsException on certain relative paths)
    
> StringIndexOutOfBoundsException computing relative paths for certain Resources
> ------------------------------------------------------------------------------
>
>                 Key: TAP5-2120
>                 URL: https://issues.apache.org/jira/browse/TAP5-2120
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core, tapestry-ioc
>    Affects Versions: 5.3, 5.4
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>            Priority: Blocker
>             Fix For: 5.4
>
>
> Discoverred as part of CSS URL rewriting.
> With a base resource of "context:css/style.css"
> a relative URL of "../images/icon.gif"
> will fail with StringIndexOutOfBounds exception.
> {code}
> java.lang.AbstractStringBuilder.setLength(AbstractStringBuilder.java:173)
> java.lang.StringBuilder.setLength(StringBuilder.java:72)
> org.apache.tapestry5.ioc.internal.util.AbstractResource.forFile(AbstractResource.java:104)
> org.apache.tapestry5.internal.services.AssetSourceImpl.findResource(AssetSourceImpl.java:241)
> org.apache.tapestry5.internal.services.AssetSourceImpl.getAssetInLocale(AssetSourceImpl.java:222)
> org.apache.tapestry5.internal.services.AssetSourceImpl.getAsset(AssetSourceImpl.java:104)
> org.apache.tapestry5.internal.services.assets.CSSURLRewriter.replaceURLs(CSSURLRewriter.java:145)
> {code}
> Basically, it can't handle the fact that context: URLs don't have to start with a leading slash. Maybe they should, but that would break backwards compatibility.

--
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