Skip to content

Commit

Permalink
Annotate some new java.net APIs. (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpovirk authored Oct 7, 2024
1 parent 6ee45ed commit 3491a93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/java.base/share/classes/java/net/DatagramSocket.java
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,7 @@ public Set<SocketOption<?>> supportedOptions() {
* @see StandardSocketOptions#IP_MULTICAST_IF
* @since 17
*/
public void joinGroup(SocketAddress mcastaddr, NetworkInterface netIf)
public void joinGroup(SocketAddress mcastaddr, @Nullable NetworkInterface netIf)
throws IOException {
delegate().joinGroup(mcastaddr, netIf);
}
Expand Down Expand Up @@ -1373,7 +1373,7 @@ public void joinGroup(SocketAddress mcastaddr, NetworkInterface netIf)
* @see StandardSocketOptions#IP_MULTICAST_IF
* @since 17
*/
public void leaveGroup(SocketAddress mcastaddr, NetworkInterface netIf)
public void leaveGroup(SocketAddress mcastaddr, @Nullable NetworkInterface netIf)
throws IOException {
delegate().leaveGroup(mcastaddr, netIf);
}
Expand Down
2 changes: 1 addition & 1 deletion src/java.base/share/classes/java/net/URL.java
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ public URL(@Nullable URL context, String spec, @Nullable URLStreamHandler handle
*
* @since 20
*/
public static URL of(URI uri, URLStreamHandler handler)
public static URL of(URI uri, @Nullable URLStreamHandler handler)
throws MalformedURLException {
if (!uri.isAbsolute()) {
throw new IllegalArgumentException("URI is not absolute");
Expand Down

0 comments on commit 3491a93

Please sign in to comment.