RFR: 8347007: --strip-debug removes parameter names included with -parameters [v2]
Henry Jen
henryjen at openjdk.org
Thu Oct 2 15:40:46 UTC 2025
On Tue, 30 Sep 2025 06:28:18 GMT, Hannes Greule <hgreule at openjdk.org> wrote:
>> Henry Jen has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Support optional argument for PluginOptions
>
> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/StripJavaDebugAttributesPlugin.java line 113:
>
>> 111: MethodTransform mt;
>> 112: if (isDroppingMethodNames) {
>> 113: mt = MethodTransform.dropping(me -> me instanceof MethodParametersAttribute)
>
> I know this is already existing behavior, but removing the attribute doesn't just remove the parameter names but also the parameter flags. This results in the same bug that was fixed by https://bugs.openjdk.org/browse/JDK-8292275 (or for a more compact description, see the CSR https://bugs.openjdk.org/browse/JDK-8292467).
>
> But that should be addressed separately.
Thank you for bring in this up. Do not support removal of MethodParameters attribute for now. If there is a need to support that, we can add a separate plugin to address optional attributes for JVM.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27566#discussion_r2399249922
More information about the core-libs-dev
mailing list