On Tue, 18 Jul 2023 12:41:32 GMT, Jaikiran Pai <j...@openjdk.org> wrote:

>> Can I please get a review of this change which proposes to deprecate for 
>> removal the  `-Xdebug` option and `-debug` option of the `java` command? 
>> This addresses https://bugs.openjdk.org/browse/JDK-8227229.
>> 
>> As noted in the JBS issue this option is currently a no-op and has been 
>> there only for backward compatible since even Java 8 days.
>
> Jaikiran Pai has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Alan's suggestion for -Xdebug output

Hello Alan,

> I think ParseArguments (in libjli/java.c) could be changed so that it doesn't 
> translate -debug to -Xdebug, instead it can print a warning, like it does for 
> -Xfuture. The reason is -debug is a java launcher option, it's not known to 
> the VM and means that Arguments::parse_each_vm_init_arg doesn't need to 
> mention -debug when it warns about -Xdebug.

I had initially considered that but had noticed that there's a small difference 
between the generic warning message "Warning: %s option is deprecated and may 
be removed in a future release." printed by the launcher and the one printed by 
the VM "OpenJDK 64-Bit Server VM warning: Option -Xdebug was deprecated in JDK 
22 and will likely be removed in a future release." But I think that small 
difference in the warning messages is OK when considered against your stated 
reasoning that `-debug` isn't known to the VM. 

I've now updated the PR to implement your suggestion.

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

PR Comment: https://git.openjdk.org/jdk/pull/14918#issuecomment-1641532218

Reply via email to