JDK 18 |
---|
18Fixed |
Relates :
|
JDK-8267521 :
|
|
JDK-8267543 :
|
|
JDK-8269409 :
|
|
JDK-8270859 :
|
JDK-8266459 deprecated the Security Manager for removal and added hundreds of `@SuppressWarnings("removal")` all around JDK. In some cases, the annotation must be added to a place which is quite faraway from where the deprecated API is called (For example, if the API is called in a static block and not in a declaration, the annotation must be added to the class level). It is not obvious what the annotation is for, and with the annotation covering too big a portion it's easy to call other deprecated methods without being noticed. Overall, there are two ways to refactor existing code to avoid this: 1. Call the deprecated API in a declaration statement. Sometimes this means a temporary or useless variable must be declared. 2. Extract the call into a separate method During the automatic conversion, we have a full list of the distance between where each annotation is added and where the deprecated API it guards is. Sub-tasks will be created in this issue to deal with them area by area. Those cases with the longest distance will be considered first.
|