Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-2567

CSSURLRewriter throws RuntimeException if asset not found, instead evaluating strictCssUrlRewriting

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 5.4.1
    • Fix Version/s: None
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      If the css header comment part contains a pattern like 'url(file_not_found)' the procedure AssetSource.getAsset throws an RuntimeException and prevents further processing, especially testing for null and evaluating StrictCSSURLRewriting.

      Caused by: java.lang.RuntimeException: Unable to locate asset 'webjars:META-INF/resources/webjars/jquery-ui/1.12.1/%22images%2Fui-icons_555555_256x240.png%22'
      (the file does not exist).
      at org.apache.tapestry5.internal.services.AssetSourceImpl.getLocalizedAssetFromResource(AssetSourceImpl.java:390)
      at org.apache.tapestry5.internal.services.AssetSourceImpl.getAssetInLocale(AssetSourceImpl.java:305)
      at org.apache.tapestry5.internal.services.AssetSourceImpl.getAsset(AssetSourceImpl.java:131)
      at $AssetSource_25dc8e7415b4a.getAsset(Unknown Source)
      at org.apache.tapestry5.internal.services.assets.CSSURLRewriter.replaceURLs(CSSURLRewriter.java:177)
      at org.apache.tapestry5.internal.services.assets.CSSURLRewriter.access$100(CSSURLRewriter.java:46)
      at org.apache.tapestry5.internal.services.assets.CSSURLRewriter$1.perform(CSSURLRewriter.java:109)
      at org.apache.tapestry5.internal.services.assets.CSSURLRewriter$1.perform(CSSURLRewriter.java:104)
      at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.perform(OperationTrackerImpl.java:110)

        Attachments

        1. CSSURLRewriter-TAP5-2567.patch
          1 kB
          Robert Hannebauer

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              r.hannebauer Robert Hannebauer
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: