8198753: (dc) DatagramChannel throws unspecified exceptions

Reviewed-by: alanb
This commit is contained in:
Brian Burkhalter 2018-03-22 12:29:52 -07:00
parent 9aff9cb645
commit 37f1b2b1e3
7 changed files with 217 additions and 75 deletions

View file

@ -508,8 +508,7 @@ class DatagramChannelImpl
if (remote != null) {
// connected
if (!target.equals(remote)) {
throw new IllegalArgumentException(
"Connected address not equal to target address");
throw new AlreadyConnectedException();
}
do {
n = IOUtil.write(fd, src, -1, nd);