[
https://issues.apache.org/jira/browse/VELOCITY-983?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claude Brisson closed VELOCITY-983.
-----------------------------------
Fix Version/s: 2.4.1
Assignee: Claude Brisson
Resolution: Fixed
PR merged. Thanks, [~tmortagne] .
> Velocity calls the wrong static "overwritten" method
> ----------------------------------------------------
>
> Key: VELOCITY-983
> URL: https://issues.apache.org/jira/browse/VELOCITY-983
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 2.4
> Reporter: Thomas Mortagne
> Assignee: Claude Brisson
> Priority: Blocker
> Fix For: 2.4.1
>
>
> Unfortunately, in my proposal in VELOCITY-952 I totally missed one use case
> which is now broken: a static method being "overwritten". Since Velocity 2.4,
> the deepest static method will be called instead of the one in the object we
> actually manipulate and unfortunately since static overrides are not real
> overrides it means it's going to call the wrong one.
> The reason [the uberspector I was using with Velocity
> 2.3|https://github.com/xwiki/xwiki-commons/blob/a21846242821db564378bb68b1060fa42c632d16/xwiki-commons-core/xwiki-commons-velocity/src/main/java/org/xwiki/velocity/introspection/MethodOverrideUberspector.java#L116]
> was not impacted is because I had an optimization to stop searching when
> hitting the first accessible method (since my focus was
> IllegalAccessException problems).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]