mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
8343467: Remove unnecessary @SuppressWarnings annotations (security)
Reviewed-by: mullan
This commit is contained in:
parent
e7fc0eb522
commit
4b21fb9df9
23 changed files with 13 additions and 36 deletions
|
@ -206,7 +206,6 @@ abstract class PBES2Parameters extends AlgorithmParametersSpi {
|
|||
this.cipherParam = ((PBEParameterSpec)paramSpec).getParameterSpec();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void engineInit(byte[] encoded)
|
||||
throws IOException
|
||||
{
|
||||
|
@ -239,7 +238,6 @@ abstract class PBES2Parameters extends AlgorithmParametersSpi {
|
|||
this.pbes2AlgorithmName = "PBEWith" + kdfAlgo + "And" + cipherAlgo;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private String parseKDF(DerValue keyDerivationFunc) throws IOException {
|
||||
|
||||
if (!pkcs5PBKDF2_OID.equals(keyDerivationFunc.data.getOID())) {
|
||||
|
@ -299,7 +297,6 @@ abstract class PBES2Parameters extends AlgorithmParametersSpi {
|
|||
return kdfAlgo;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private String parseES(DerValue encryptionScheme) throws IOException {
|
||||
String cipherAlgo;
|
||||
|
||||
|
|
|
@ -81,7 +81,6 @@ final class SealedObjectForKeyProtector extends SealedObject {
|
|||
.getExtObjectInputStream(this, c)) {
|
||||
ois.setObjectInputFilter(new DeserializationChecker(maxLength));
|
||||
try {
|
||||
@SuppressWarnings("unchecked")
|
||||
Key t = (Key) ois.readObject();
|
||||
return t;
|
||||
} catch (InvalidClassException ice) {
|
||||
|
|
|
@ -115,7 +115,6 @@ public interface Key extends java.io.Serializable {
|
|||
* ineffectual. Do not use; no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
@java.io.Serial
|
||||
long serialVersionUID = 6603384152749567654L;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -68,7 +68,6 @@ public interface PrivateKey extends AsymmetricKey, javax.security.auth.Destroyab
|
|||
* ineffectual. Do not use; no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
@java.io.Serial
|
||||
long serialVersionUID = 6034044314589513430L;
|
||||
}
|
||||
|
|
|
@ -827,7 +827,7 @@ public abstract class Provider extends Properties {
|
|||
return o;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked") // Function must actually operate over strings
|
||||
// Function must actually operate over strings
|
||||
private void implReplaceAll(BiFunction<? super Object, ? super Object,
|
||||
? extends Object> function) {
|
||||
|
||||
|
@ -847,7 +847,7 @@ public abstract class Provider extends Properties {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked") // Function must actually operate over strings
|
||||
// Function must actually operate over strings
|
||||
private Object implMerge(Object key, Object value,
|
||||
BiFunction<? super Object, ? super Object, ? extends Object>
|
||||
remappingFunction) {
|
||||
|
@ -864,7 +864,7 @@ public abstract class Provider extends Properties {
|
|||
return o;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked") // Function must actually operate over strings
|
||||
// Function must actually operate over strings
|
||||
private Object implCompute(Object key, BiFunction<? super Object,
|
||||
? super Object, ? extends Object> remappingFunction) {
|
||||
|
||||
|
@ -881,7 +881,7 @@ public abstract class Provider extends Properties {
|
|||
return o;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked") // Function must actually operate over strings
|
||||
// Function must actually operate over strings
|
||||
private Object implComputeIfAbsent(Object key, Function<? super Object,
|
||||
? extends Object> mappingFunction) {
|
||||
if (!checkLegacy(key)) return null;
|
||||
|
@ -893,7 +893,7 @@ public abstract class Provider extends Properties {
|
|||
return o;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked") // Function must actually operate over strings
|
||||
// Function must actually operate over strings
|
||||
private Object implComputeIfPresent(Object key, BiFunction<? super Object,
|
||||
? super Object, ? extends Object> remappingFunction) {
|
||||
if (!checkLegacy(key)) return null;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -54,7 +54,6 @@ public interface PublicKey extends AsymmetricKey {
|
|||
* ineffectual. Do not use; no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
@java.io.Serial
|
||||
long serialVersionUID = 7187392471159151072L;
|
||||
}
|
||||
|
|
|
@ -52,7 +52,6 @@ public interface DSAPrivateKey extends DSAKey, java.security.PrivateKey {
|
|||
* ineffectual. Do not use; no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
@java.io.Serial
|
||||
long serialVersionUID = 7776497482533790279L;
|
||||
|
||||
|
|
|
@ -52,7 +52,6 @@ public interface DSAPublicKey extends DSAKey, java.security.PublicKey {
|
|||
* ineffectual. Do not use; no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
@java.io.Serial
|
||||
long serialVersionUID = 1234526332779022332L;
|
||||
|
||||
|
|
|
@ -48,7 +48,6 @@ public interface ECPrivateKey extends PrivateKey, ECKey {
|
|||
* ineffectual. Do not use; no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
@java.io.Serial
|
||||
long serialVersionUID = -7896394956925609184L;
|
||||
|
||||
|
|
|
@ -50,7 +50,6 @@ public interface ECPublicKey extends PublicKey, ECKey {
|
|||
* ineffectual. Do not use; no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
@java.io.Serial
|
||||
long serialVersionUID = -3314988629879632826L;
|
||||
|
||||
|
|
|
@ -57,7 +57,6 @@ public interface RSAMultiPrimePrivateCrtKey extends RSAPrivateKey {
|
|||
* ineffectual. Do not use; no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
@java.io.Serial
|
||||
long serialVersionUID = 618058533534628008L;
|
||||
|
||||
|
|
|
@ -52,7 +52,6 @@ public interface RSAPrivateCrtKey extends RSAPrivateKey {
|
|||
* ineffectual. Do not use; no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
@java.io.Serial
|
||||
long serialVersionUID = -5682214253527700368L;
|
||||
|
||||
|
|
|
@ -50,7 +50,6 @@ public interface RSAPrivateKey extends java.security.PrivateKey, RSAKey
|
|||
* ineffectual. Do not use; no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
@java.io.Serial
|
||||
long serialVersionUID = 5187144804936595022L;
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@ public interface RSAPublicKey extends java.security.PublicKey, RSAKey
|
|||
* ineffectual. Do not use; no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
@java.io.Serial
|
||||
long serialVersionUID = -8727434096241101194L;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -68,6 +68,5 @@ public interface SecretKey extends
|
|||
* ineffectual. Do not use; no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
long serialVersionUID = -4795878709595146952L;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,6 @@ public interface DHPrivateKey extends DHKey, java.security.PrivateKey {
|
|||
* ineffectual. Do not use; no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
@java.io.Serial
|
||||
long serialVersionUID = 2211791113380396553L;
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@ public interface DHPublicKey extends DHKey, java.security.PublicKey {
|
|||
* ineffectual. Do not use; no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
@java.io.Serial
|
||||
long serialVersionUID = -6628103563352519193L;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2001, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -44,7 +44,6 @@ public interface PBEKey extends javax.crypto.SecretKey {
|
|||
* ineffectual. Do not use; no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
@java.io.Serial
|
||||
long serialVersionUID = -1430015993304333921L;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -49,7 +49,6 @@ public interface TlsMasterSecret extends SecretKey {
|
|||
* ineffectual. Do not use; no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
@java.io.Serial
|
||||
long serialVersionUID = -461748105810469773L;
|
||||
|
||||
|
|
|
@ -149,7 +149,6 @@ final class ProviderConfig {
|
|||
/**
|
||||
* Get the provider object. Loads the provider if it is not already loaded.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
Provider getProvider() {
|
||||
// volatile variable load
|
||||
Provider p = provider;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue