Skip to content

Commit eb6c566

Browse files
committed
add supresswarnings annotations automatically
1 parent 26a54a8 commit eb6c566

File tree

815 files changed

+1796
-93
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

815 files changed

+1796
-93
lines changed

src/demo/share/jfc/J2Ddemo/java2d/Tools.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ public void run() {
406406
if (pDialogState) {
407407
printJob.print(aset);
408408
}
409-
} catch (java.security.AccessControlException ace) {
409+
} catch (@SuppressWarnings("removal") java.security.AccessControlException ace) {
410410
String errmsg = "Applet access control exception; to allow "
411411
+ "access to printer, set\n"
412412
+ "permission for \"queuePrintJob\" in "

src/java.base/aix/classes/sun/nio/ch/DefaultSelectorProvider.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
* Creates this platform's default SelectorProvider
3333
*/
3434

35+
@SuppressWarnings("removal")
3536
public class DefaultSelectorProvider {
3637
private static final SelectorProviderImpl INSTANCE;
3738
static {

src/java.base/linux/classes/jdk/internal/platform/CgroupUtil.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939

4040
public final class CgroupUtil {
4141

42+
@SuppressWarnings("removal")
4243
public static Stream<String> readFilePrivileged(Path path) throws IOException {
4344
try {
4445
PrivilegedExceptionAction<Stream<String>> pea = () -> Files.lines(path);
@@ -64,7 +65,7 @@ static void unwrapIOExceptionAndRethrow(PrivilegedActionException pae) throws IO
6465
static String readStringValue(CgroupSubsystemController controller, String param) throws IOException {
6566
PrivilegedExceptionAction<BufferedReader> pea = () ->
6667
Files.newBufferedReader(Paths.get(controller.path(), param));
67-
try (BufferedReader bufferedReader =
68+
try (@SuppressWarnings("removal") BufferedReader bufferedReader =
6869
AccessController.doPrivileged(pea)) {
6970
String line = bufferedReader.readLine();
7071
return line;
@@ -76,6 +77,7 @@ static String readStringValue(CgroupSubsystemController controller, String param
7677
}
7778
}
7879

80+
@SuppressWarnings("removal")
7981
public static List<String> readAllLinesPrivileged(Path path) throws IOException {
8082
try {
8183
PrivilegedExceptionAction<List<String>> pea = () -> Files.readAllLines(path);

src/java.base/linux/classes/sun/nio/ch/DefaultSelectorProvider.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
* Creates this platform's default SelectorProvider
3333
*/
3434

35+
@SuppressWarnings("removal")
3536
public class DefaultSelectorProvider {
3637
private static final SelectorProviderImpl INSTANCE;
3738
static {

src/java.base/macosx/classes/apple/security/AppleProvider.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public Object newInstance(Object ctrParamObj)
7373
}
7474

7575

76+
@SuppressWarnings("removal")
7677
public AppleProvider() {
7778
/* We are the Apple provider */
7879
super("Apple", PROVIDER_VER, info);

src/java.base/macosx/classes/apple/security/KeychainStore.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ class TrustedCertEntry {
110110
}
111111

112112
private static void permissionCheck() {
113+
@SuppressWarnings("removal")
113114
SecurityManager sec = System.getSecurityManager();
114115

115116
if (sec != null) {

src/java.base/macosx/classes/java/net/DefaultInterface.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ private static NetworkInterface chooseDefaultInterface() {
106106

107107
boolean ip4 = false, ip6 = false, isNonLinkLocal = false;
108108
PrivilegedAction<Enumeration<InetAddress>> pa = ni::getInetAddresses;
109+
@SuppressWarnings("removal")
109110
Enumeration<InetAddress> addrs = AccessController.doPrivileged(pa);
110111
while (addrs.hasMoreElements()) {
111112
InetAddress addr = addrs.nextElement();

src/java.base/macosx/classes/sun/nio/ch/DefaultSelectorProvider.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
* Creates this platform's default SelectorProvider
3333
*/
3434

35+
@SuppressWarnings("removal")
3536
public class DefaultSelectorProvider {
3637
private static final SelectorProviderImpl INSTANCE;
3738
static {

src/java.base/share/classes/com/sun/crypto/provider/DHKeyAgreement.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ private static class AllowKDF {
6666

6767
private static final boolean VALUE = getValue();
6868

69+
@SuppressWarnings("removal")
6970
private static boolean getValue() {
7071
return AccessController.doPrivileged(
7172
(PrivilegedAction<Boolean>)

src/java.base/share/classes/com/sun/crypto/provider/JceKeyStore.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,7 @@ public void engineStore(OutputStream stream, char[] password)
683683
* @exception CertificateException if any of the certificates in the
684684
* keystore could not be loaded
685685
*/
686+
@SuppressWarnings("removal")
686687
public void engineLoad(InputStream stream, char[] password)
687688
throws IOException, NoSuchAlgorithmException, CertificateException
688689
{

0 commit comments

Comments
 (0)