This fix removes NetworkPermission checks that were made redundant in jdk/net/ExtendedSocketOptions after the socket option SO_FLOW_SLA was removed.
Reviewed-by: alanb
This fix clarifies the behaviours of constructors from DatagramSocket and MulticastSocket when no address or a null address is supplied.
Reviewed-by: dfuchs
This patch removes ExtendedSocketOptions.SO_FLOW_SLA, SocketFlow and SocketFlow.Status which were terminally deprecated in JDK 14 in preparation for the removal of the Solaris port.
Reviewed-by: alanb, dfuchs, chegar, vtewari
This patch updates the @modules tag with +open in the tests UnreferencedDatagramSockets and UnreferncedMulticastSockets in advance of the removal of --illegal-access to allow access to private member fields required by the tests.
Reviewed-by: alanb, dfuchs
Rework non-default file system paths of BodySubscriber::ofFile and BodyHandler::ofFile and fix BodyHandler::ofFileDownload to throw consistently for non-default file system paths
Reviewed-by: dfuchs, chegar
This fix updates the spec for DatagramSocket's constructors to inform the user of the Exceptions thrown when an invalid argument is passed.
Reviewed-by: dfuchs
Add support for the SO_INCOMING_NAPI_ID socket option to jdk.net.ExtendedSocketOptions
Co-authored-by: Dinesh Kumar <dinesh.kumar@intel.com>
Reviewed-by: alanb, chegar, dfuchs, vtewari, pconcannon
Replace the underlying implementations of the java.net.DatagramSocket and java.net.MulticastSocket APIs with simpler and more modern implementations that are easy to maintain and debug.
Co-authored-by: Alan Bateman <alan.bateman@oracle.com>
Co-authored-by: Chris Hegarty <chris.hegarty@oracle.com>
Co-authored-by: Daniel Fuchs <daniel.fuchs@oracle.com>
Reviewed-by: alanb, chegar, dfuchs
The test java.net.httpclient.websocket.WSHandshakeExceptionTest.java checks that the websocket client handles invalid utf-8 sent by the websocket server
Reviewed-by: dfuchs
The fix updates jdk.internal.net.http.websocket. OpeningHandshake.send() method to process the response body from server
Reviewed-by: chegar, dfuchs, prappo
Tests added for methods: setSendBufferSize(int), getSendBufferSize(), and getReceieveBufferSize() to increase test coverage in the DatagramSocket class
Reviewed-by: alanb, chegar, dfuchs
This fix adds a check for port == 0 to MulticastSocket's 2-arg send method to ensure a consistent exception is thrown across platforms
Reviewed-by: dfuchs
This fix changes the default port of a DatagramPacket from -1 to 0, which changes the behaviour of calling getSocketAddress with no port set from throwing an IAE to returning an InetSocketAddress representing any local address with port 0.
Reviewed-by: alanb, chegar, dfuchs
8239595: ssl context version is not respected
The java.net.HttpClient is updated to no longer override any default selected protocols in the SSLContext, in the absence of any SSLParameters explicitly supplied to the HttpClient.builder.
Reviewed-by: chegar, dfuchs
DefaultInetrface.getDefault is updated to prefer interfaces that have non link-local addresses. NetworkConfiguration is updated to skip interface that have only link-local addresses, whether IPv4 or IPv6, for multicasting.
Reviewed-by: chegar, alanb
The fix updates the incorrect example of the usage of the class java.net.http.HttpResponse.BodySubscribers.
Reviewed-by: chegar, dfuchs, jboes, pconcannon
The solaris specific code is changed to use the fallback mechanism if the DLPI interface returns an error indicating that the operation is unsupported. In addition, NetworkInterface::getHardwareAddress is changed to always return null for the loopback interface.
Reviewed-by: alanb
Updates DatagramChannel so that the SO_SNDBUF is set to a minimum value of 65527 for IPv6 sockets and 65507 for IPv4 sockets on macOS.
Reviewed-by: alanb, dfuchs
The test assumed that ByteBuffer would be split at long boundaries. This is obviously not always the case. A carry has been added to support reading a long split over several buffers.
Reviewed-by: chegar
The SSLTube and SSLFlowDelegate are improved to wrap any non-SSL exception that occur during the handshake in an SSLHandshakeException.
Reviewed-by: chegar