Skip to content

Commit f95097c

Browse files
committedNov 5, 2024
8343482: Remove unnecessary @SuppressWarnings annotations (net)
Reviewed-by: dfuchs
1 parent c799cad commit f95097c

File tree

4 files changed

+3
-9
lines changed

4 files changed

+3
-9
lines changed
 

‎src/java.base/share/classes/java/net/Socket.java

-1
Original file line numberDiff line numberDiff line change
@@ -2057,7 +2057,6 @@ public <T> Socket setOption(SocketOption<T> name, T value) throws IOException {
20572057
*
20582058
* @since 9
20592059
*/
2060-
@SuppressWarnings("unchecked")
20612060
public <T> T getOption(SocketOption<T> name) throws IOException {
20622061
Objects.requireNonNull(name);
20632062
if (isClosed())

‎src/java.base/share/classes/sun/net/www/protocol/http/NegotiateAuthentication.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -50,7 +50,6 @@ class NegotiateAuthentication extends AuthenticationInfo {
5050
@java.io.Serial
5151
private static final long serialVersionUID = 100L;
5252

53-
@SuppressWarnings("serial") // Not statically typed as Serializable
5453
private final HttpCallerInfo hci;
5554

5655
// These maps are used to manage the GSS availability for different
@@ -71,7 +70,6 @@ class NegotiateAuthentication extends AuthenticationInfo {
7170
}
7271

7372
// The HTTP Negotiate Helper
74-
@SuppressWarnings("serial") // Not statically typed as Serializable
7573
private Negotiator negotiator = null;
7674

7775
/**

‎src/java.base/unix/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -120,10 +120,8 @@ public String run() {
120120
});
121121
};
122122

123-
@SuppressWarnings("serial") // Type of field is not Serializable
124123
PasswordAuthentication pw;
125124

126-
@SuppressWarnings("serial") // Type of field is not Serializable
127125
Client client;
128126
/**
129127
* Create a NTLMAuthentication:

‎src/jdk.net/share/classes/jdk/net/Sockets.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -303,7 +303,6 @@ static boolean isReusePortAvailable() {
303303
return isReusePortAvailable;
304304
}
305305

306-
@SuppressWarnings("removal")
307306
private static Map<Class<?>,Set<SocketOption<?>>> optionSets() {
308307
Map<Class<?>,Set<SocketOption<?>>> options = new HashMap<>();
309308
boolean incomingNapiIdsupported = PlatformSocketOptions.get().incomingNapiIdSupported();

0 commit comments

Comments
 (0)
Please sign in to comment.