mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8234103: DatagramSocketImpl::socket is not needed
DatagramSocketImpl has a socket field that links back to the DatagramSocket. This is only used to figure out whether multicasting is supported or not. This fix replaces it with a boolean isMulticast. Reviewed-by: alanb, chegar, dfuchs
This commit is contained in:
parent
a0b8244416
commit
e636c69e61
8 changed files with 25 additions and 23 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2019, 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
|
||||
|
@ -69,7 +69,7 @@ class DefaultDatagramSocketImplFactory {
|
|||
throw new SocketException("can't instantiate DatagramSocketImpl");
|
||||
}
|
||||
} else {
|
||||
return new java.net.PlainDatagramSocketImpl();
|
||||
return new java.net.PlainDatagramSocketImpl(isMulticast);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,6 +37,10 @@ import sun.net.ext.ExtendedSocketOptions;
|
|||
|
||||
class PlainDatagramSocketImpl extends AbstractPlainDatagramSocketImpl
|
||||
{
|
||||
PlainDatagramSocketImpl(boolean isMulticast) {
|
||||
super(isMulticast);
|
||||
}
|
||||
|
||||
static {
|
||||
init();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue