Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ protected void engineInit(AlgorithmParameterSpec paramSpec)
this.cipherParam = ((PBEParameterSpec)paramSpec).getParameterSpec();
}

@SuppressWarnings("deprecation")
protected void engineInit(byte[] encoded)
throws IOException
{
Expand Down Expand Up @@ -239,7 +238,6 @@ protected void engineInit(byte[] encoded)
this.pbes2AlgorithmName = "PBEWith" + kdfAlgo + "And" + cipherAlgo;
}

@SuppressWarnings("deprecation")
private String parseKDF(DerValue keyDerivationFunc) throws IOException {

if (!pkcs5PBKDF2_OID.equals(keyDerivationFunc.data.getOID())) {
Expand Down Expand Up @@ -299,7 +297,6 @@ private String parseKDF(DerValue keyDerivationFunc) throws IOException {
return kdfAlgo;
}

@SuppressWarnings("deprecation")
private String parseES(DerValue encryptionScheme) throws IOException {
String cipherAlgo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ final Key getKey(Cipher c, int maxLength)
.getExtObjectInputStream(this, c)) {
ois.setObjectInputFilter(new DeserializationChecker(maxLength));
try {
@SuppressWarnings("unchecked")
Key t = (Key) ois.readObject();
return t;
} catch (InvalidClassException ice) {
Expand Down
1 change: 0 additions & 1 deletion src/java.base/share/classes/java/security/Key.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 1 addition & 2 deletions src/java.base/share/classes/java/security/PrivateKey.java
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;
}
10 changes: 5 additions & 5 deletions src/java.base/share/classes/java/security/Provider.java
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ private Object implReplace(Object key, Object value) {
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) {

Expand All @@ -847,7 +847,7 @@ private void implReplaceAll(BiFunction<? super Object, ? super Object,
}
}

@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) {
Expand All @@ -864,7 +864,7 @@ private Object implMerge(Object key, Object value,
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) {

Expand All @@ -881,7 +881,7 @@ private Object implCompute(Object key, BiFunction<? super Object,
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;
Expand All @@ -893,7 +893,7 @@ private Object implComputeIfAbsent(Object key, Function<? super Object,
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;
Expand Down
3 changes: 1 addition & 2 deletions src/java.base/share/classes/java/security/PublicKey.java
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -54,7 +54,6 @@ public interface PublicKey extends AsymmetricKey {
* ineffectual. Do not use; no replacement.
*/
@Deprecated
@SuppressWarnings("serial")
@java.io.Serial
long serialVersionUID = 7187392471159151072L;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public interface RSAMultiPrimePrivateCrtKey extends RSAPrivateKey {
* ineffectual. Do not use; no replacement.
*/
@Deprecated
@SuppressWarnings("serial")
@java.io.Serial
long serialVersionUID = 618058533534628008L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public interface RSAPrivateCrtKey extends RSAPrivateKey {
* ineffectual. Do not use; no replacement.
*/
@Deprecated
@SuppressWarnings("serial")
@java.io.Serial
long serialVersionUID = -5682214253527700368L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 1 addition & 2 deletions src/java.base/share/classes/javax/crypto/SecretKey.java
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -68,6 +68,5 @@ public interface SecretKey extends
* ineffectual. Do not use; no replacement.
*/
@Deprecated
@SuppressWarnings("serial")
long serialVersionUID = -4795878709595146952L;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -49,7 +49,6 @@ public interface TlsMasterSecret extends SecretKey {
* ineffectual. Do not use; no replacement.
*/
@Deprecated
@SuppressWarnings("serial")
@java.io.Serial
long serialVersionUID = -461748105810469773L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ public String toString() {
/**
* Get the provider object. Loads the provider if it is not already loaded.
*/
@SuppressWarnings("deprecation")
Provider getProvider() {
// volatile variable load
Provider p = provider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,7 @@ private static <T> Object findAux(Subject subject, String serverPrincipal,
Iterator<Object> iterator = pcs.iterator();
while (iterator.hasNext()) {
Object obj = iterator.next();
if (!(obj instanceof @SuppressWarnings("unchecked")
KerberosTicket ticket)) {
if (!(obj instanceof KerberosTicket ticket)) {
continue;
}
if (DEBUG != null) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2019, 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
Expand Down Expand Up @@ -107,7 +107,6 @@ protected void engineInit(AlgorithmParameterSpec params,
// compatibility, it is nonsensical for an anonymous class to define a
// serialVersionUID. Suppress warnings relative to missing serialVersionUID
// field in the anonymous subclass of serializable SecretKey.
@SuppressWarnings("serial")
private static final SecretKey NULL_KEY = new SecretKey() {
public byte[] getEncoded() {
return new byte[0];
Expand Down
2 changes: 1 addition & 1 deletion src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpNet.java
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ static native void setInitMsgOption0(int fd, int arg1, int arg2)
loadSctpLibrary();
}

@SuppressWarnings({"removal", "restricted"})
@SuppressWarnings("restricted")
private static void loadSctpLibrary() {
IOUtil.load(); // loads nio & net native libraries
System.loadLibrary("sctp");
Expand Down