RFR: 8303485: Replacing os.name for operating system customization [v7]
Andrey Turbanov
aturbanov at openjdk.org
Mon Mar 27 14:34:36 UTC 2023
On Mon, 27 Mar 2023 14:19:04 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> As I can see it uses deprecated `SecurityManager`, but it's not deprecated itself.
>> Do I miss something? Or javac generates warning even in such cases?
>
> https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/sun/security/action/GetPropertyAction.java#L104
But it's not a deprecation of the method/class. It just suppression of the warning.
`GetPropertyAction.privilegedGetProperty` is used in many places in JDK, without `@SuppressWarnings("removal")`. It doesn't create any problems.
As an example `java.lang.VirtualThread#createDelayedTaskScheduler`. There is no redundant suppression https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/lang/VirtualThread.java#L1107
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/12931#discussion_r1149337687
More information about the core-libs-dev
mailing list