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

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

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

Hudson commented on TAP5-2120:
------------------------------

Integrated in tapestry-trunk-freestyle #1069 (See [https://builds.apache.org/job/tapestry-trunk-freestyle/1069/])
    TAP5-2120: Handle relative URLs through root of resource domain (Revision 98e7d96c44dcd6f8142d158ffb096af67f6bcc24)

     Result = SUCCESS
hlship : 
Files : 
* tapestry-core/src/main/java/org/apache/tapestry5/modules/TapestryModule.java
* tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/AbstractResource.java
* tapestry-ioc/src/test/groovy/ioc/specs/ClasspathResourceSpec.groovy

                
> 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