mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8223457: java.net.ServerSocket protected constructor should throw NPE if impl null
Reviewed-by: dfuchs
This commit is contained in:
parent
2fdb2a6f85
commit
7e142d54bf
2 changed files with 44 additions and 0 deletions
|
@ -32,6 +32,7 @@ import java.lang.reflect.InvocationTargetException;
|
|||
import java.nio.channels.ServerSocketChannel;
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedExceptionAction;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.Collections;
|
||||
|
||||
|
@ -81,6 +82,7 @@ class ServerSocket implements java.io.Closeable {
|
|||
* @since 12
|
||||
*/
|
||||
protected ServerSocket(SocketImpl impl) {
|
||||
Objects.requireNonNull(impl);
|
||||
this.impl = impl;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue