[ https://issues.apache.org/jira/browse/VELOCITY-983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17885831#comment-17885831 ]
Thomas Mortagne commented on VELOCITY-983: ------------------------------------------ Created https://github.com/apache/velocity-engine/pull/53 > 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 > Priority: Blocker > > 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: dev-unsubscr...@velocity.apache.org For additional commands, e-mail: dev-h...@velocity.apache.org