[jira] [Created] (VELOCITY-983) Velocity calles the wrong static overwritten method

"Thomas Mortagne (Jira)" <[email protected]>
Newsgroups gmane.comp.jakarta.velocity.devel
Message-ID <[email protected]>
Thomas Mortagne created VELOCITY-983:
----------------------------------------

             Summary: Velocity calles 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


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)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.