Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-827

Default properties initialized with a slash-leading path, problems with repackaging via maven shade

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 1.7, 2.0
    • 2.0
    • Engine
    • None

    Description

      The initialization code in RuntimeInstance uses a /-prefixed resource path to read a class's resource. This is a bad coding idiom in general and the logging message adds to the confusion because it creates a File instance out of the resource...

      The problem with '/'-leading paths is that many obfuscators (including maven shade) don't recognize it as a resource path and don't replace it when repackaging.

      The attached patch uses the class loader to read the resource (without prefixing it with '/').

      Attachments

        1. VELOCITY-827.patch
          1 kB
          Dawid Weiss

        Activity

          People

            cbrisson Claude Brisson
            dweiss Dawid Weiss
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: