On Tue, 3 Sep 2024 10:16:52 GMT, Alan Bateman <[email protected]> wrote:
>> Maybe we can call these tags pointless. But they do give a useful check
>> that our own code (which should be limited to the tool being deprecated
>> here) has to be aware of and suppress the deprecation.
>>
>> Also if anybody does have e.g. class MyTool extends DebugServer and was
>> building with something like:
>>
>> bash-4.2$ javac --add-modules jdk.hotspot.agent --add-exports
>> jdk.hotspot.agent/sun.jvm.hotspot=ALL-UNNAMED MyTool.java
>>
>> ..then that was building with no error, but now gets a Warning:
>>
>> bash-4.2$ build/linux-x64/images/jdk/bin/javac --add-modules
>> jdk.hotspot.agent --add-exports
>> jdk.hotspot.agent/sun.jvm.hotspot=ALL-UNNAMED MyTool.java
>>
>>
>> MyTool.java:3: warning: [removal] DebugServer in sun.jvm.hotspot has been
>> deprecated and marked for removal
>> public class MyTool extends DebugServer {
>> ^
>> 1 warning
>>
>>
>> ..so they do offer some safeguard.
>
>> Maybe we can call these tags pointless. But they do give a useful check that
>> our own code (which should be limited to the tool being deprecated here) has
>> to be aware of and suppress the deprecation.
>
> If you find them useful then okay, main thing is that this is all internal to
> the jdk.hotspot.agent module. In some future release then this code will be
> removed and maybe the deprecated annotation will help identify the dead code.
Yes all internal and the tags do not increase our commitment, just may help
with finding edge cases. I think they are useful and cheap, thanks.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20830#discussion_r1741825692