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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.7, 2.0
    • Fix Version/s: 2.0
    • Component/s: Engine
    • Labels:
      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

          Activity

            People

            • Assignee:
              claude Claude Brisson
              Reporter:
              dweiss Dawid Weiss
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: