RFR: 8369734: JvmtiExport::post_class_file_load_hook return value is never used
Serguei Spitsyn
sspitsyn at openjdk.org
Wed Oct 15 06:22:05 UTC 2025
On Mon, 13 Oct 2025 22:26:42 GMT, Francesco Andreuzzi <fandreuzzi at openjdk.org> wrote:
> `JvmtiExport::post_class_file_load_hook` returns a boolean, which tells whether the hook modified the class data or not. Users of the function write the same check on their own. I propose replacing the handwritten check with the boolean returned by `post_class_file_load_hook`.
>
> Passes tier1 and tier2 (fastdebug).
David posted:
> I'd be more inclined to treat the has_been_modified aspect of JvmtiClassFileLoadHookPoster as dead code and remove it again. But we need serviceability folk to make that call - @plummercj or @sspitsyn ?
I agree with David. It is better to treat the the `has_been_modified` aspect of `JvmtiClassFileLoadHookPoster` as dead code and remove it again.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27777#issuecomment-3404733969
More information about the serviceability-dev
mailing list