[
https://issues.apache.org/jira/browse/VELOCITY-827?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claude Brisson resolved VELOCITY-827.
-------------------------------------
Resolution: Fixed
Assignee: Claude Brisson
Fix Version/s: (was: 1.7.x)
Patch applied. I didn't test maven shading, though, on this one I trust your
patch...
> Default properties initialized with a slash-leading path, problems with
> repackaging via maven shade
> ---------------------------------------------------------------------------------------------------
>
> Key: VELOCITY-827
> URL: https://issues.apache.org/jira/browse/VELOCITY-827
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 1.7, 2.x
> Reporter: Dawid Weiss
> Assignee: Claude Brisson
> Priority: Trivial
> Fix For: 2.x
>
> Attachments: VELOCITY-827.patch
>
>
> 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 '/').
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]