Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-1315

Context expression without period results in StringIndexOutOfBoundsException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 5.0
    • 5.0.8
    • tapestry-ioc
    • None
    • Tapestry 5.0.2, Windows XP

    Description

      A context expression that does not include at least one period (for example "context:/blah") results in a StringIndexOutOfBoundsException.
      "String index out of range: -1"

      1. java.lang.String.substring(String.java:1768)
      2. org.apache.tapestry.ioc.internal.util.LocalizedNameGenerator.<init>(LocalizedNameGenerator.java:68)
      3. org.apache.tapestry.ioc.internal.util.AbstractResource.forLocale(AbstractResource.java:101)
      4. org.apache.tapestry.internal.services.AssetSourceImpl.findRelativeAsset(AssetSourceImpl.java:93)
      5. org.apache.tapestry.internal.services.AssetSourceImpl.findAsset(AssetSourceImpl.java:87)
      6. org.example.myapp.components.PageStyle.setup(PageStyle.java:30)
        .
        .

      Attachments

        1. LocalizedNameGenerator.java
          5 kB
          Paul Cooley
        2. LocalizedNameGeneratorTest.java
          2 kB
          Paul Cooley

        Activity

          People

            hlship Howard Lewis Ship
            pekim Mike D Pilsbury
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: