RFR: 8338471: Refactor Method::get_new_method() for better NoSuchMethodError handling [v4]

Coleen Phillimore coleenp at openjdk.org
Thu Sep 12 13:09:06 UTC 2024


On Wed, 11 Sep 2024 21:02:41 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:

>> This patch cleans up the use of `get_new_method()` so callers don't have to worry about throwing `NoSuchMethodError`. The method is refactored to throw the error and avoid ever returning nullptr. Verified with tier1-5 tests.
>
> Matias Saavedra Silva has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Coleen suggestion

Lastly, the option -XX:+AllowRedefinitionToAddDeleteMethods is the deprecated option where this is possible.  I just did some research to see if it's time to obsolete this option but I did find some places where people use this for products.  The worst place for this is if your redefined functions have lambda expressions, javac creates static private methods to implement them and tools that instrument native methods use this.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/20874#issuecomment-2346235396


More information about the serviceability-dev mailing list