Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6669

CSS Resource Bundling throws exception when used with CssUrlReplacer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 7.10.0
    • 8.5.0, 9.0.0-M2, 7.14.0
    • wicket
    • None

    Description

      Using CssUrlReplacer as compressor and trying to create a Css Resource bundle like this:

      getResourceSettings().setCssCompressor(new CssUrlReplacer());
      
      getResourceBundles().addCssBundle(WicketApplication.class, "testBundle", new CssResourceReference(WicketApplication.class, "css/cssFile1.css"), new CssResourceReference(WicketApplication.class, "css/cssFile2.css"));

      I get the following stack trace when requesting one of the css files:

      Caused by: java.lang.UnsupportedOperationException: CssUrlReplacer.process() should be used instead!
      at org.apache.wicket.resource.CssUrlReplacer.compress(CssUrlReplacer.java:159) ~[wicket-core-7.10.0.jar:7.10.0]
      at org.apache.wicket.resource.bundles.ConcatBundleResource.readAllResources(ConcatBundleResource.java:184) ~[wicket-core-7.10.0.jar:7.10.0]

      ....

      ConcatBundleResource calls the compress method of CssUrlReplacer which throws the exception.

      Attachments

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              Claudia Hirt Claudia Hirt
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: