Velocity
  1. Velocity
  2. VELOCITY-827

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

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Trivial Trivial
    • Resolution: Unresolved
    • Affects Version/s: 1.7, 2.x
    • Fix Version/s: 1.7.x, 2.x
    • 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 '/').

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Dawid Weiss
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development