Re: RFR: 8344217: Remove calls to SecurityManager and doPrivileged in java.net.DatagramSocket and java.net.NetMulticastSocket after JEP 486 integration

2024-11-21 Thread Alan Bateman
On Thu, 21 Nov 2024 18:43:55 GMT, Daniel Fuchs wrote: > Please find here a patch that removes use of SecurityManager and doPrivileged > in DatagramSocket/MulticastSocket implementation. > > Some allusion to the SecurityManager was missed in DatagramSocket::connect, > so this patch contains a s

Re: RFR: 8344217: Remove calls to SecurityManager and doPrivileged in java.net.DatagramSocket and java.net.NetMulticastSocket after JEP 486 integration

2024-11-21 Thread Jaikiran Pai
On Thu, 21 Nov 2024 18:43:55 GMT, Daniel Fuchs wrote: > Please find here a patch that removes use of SecurityManager and doPrivileged > in DatagramSocket/MulticastSocket implementation. > > Some allusion to the SecurityManager was missed in DatagramSocket::connect, > so this patch contains a s

Re: RFR: 8344346: java/net/httpclient/ShutdownNow.java fails with java.lang.AssertionError: client was still running, but exited after further delay: timeout should be adjusted [v2]

2024-11-21 Thread Jaikiran Pai
On Thu, 21 Nov 2024 15:26:43 GMT, Daniel Fuchs wrote: >> This test has been observed failing once in our CI. Adjusting the timeout >> with Utils.adjustTimeout should give the test greater stability. > > Daniel Fuchs has updated the pull request incrementally with one additional > commit since t

Re: RFR: 8344346: java/net/httpclient/ShutdownNow.java fails with java.lang.AssertionError: client was still running, but exited after further delay: timeout should be adjusted [v2]

2024-11-21 Thread Jaikiran Pai
On Thu, 21 Nov 2024 15:20:23 GMT, Daniel Fuchs wrote: > I am not sure this is necessary, the test already imports several other > classes from that library (import jdk.test.lib.RandomFactory; import > jdk.test.lib.net.SimpleSSLContext;) and not all are listed in the@build. It's likely it's not

Re: RFR: 8344366: Remove Security Manager dependencies from javax.net.ssl and sun.security.ssl packages

2024-11-21 Thread Alexey Bakhtin
On Thu, 21 Nov 2024 22:45:12 GMT, Sean Mullan wrote: >> src/java.base/share/classes/javax/net/ssl/TrustManagerFactory.java line 72: >> >>> 70: * security property to the desired algorithm name. >>> 71: * >>> 72: * @see java.security.Security security properties >> >> it looks lik

Re: RFR: 8344366: Remove Security Manager dependencies from javax.net.ssl and sun.security.ssl packages

2024-11-21 Thread Alexey Bakhtin
On Thu, 21 Nov 2024 18:29:24 GMT, Sean Mullan wrote: > Now that JEP 486 has been integrated, the `javax.net.ssl` and > `sun.security.ssl` package implementation dependencies on > `System.getSecurityManager`, `AccessController.doPrivileged` and > `AccessControlContext` can be removed. > > Most

Re: RFR: 8344366: Remove Security Manager dependencies from javax.net.ssl and sun.security.ssl packages

2024-11-21 Thread Sean Mullan
On Thu, 21 Nov 2024 21:55:54 GMT, Alexey Bakhtin wrote: >> Now that JEP 486 has been integrated, the `javax.net.ssl` and >> `sun.security.ssl` package implementation dependencies on >> `System.getSecurityManager`, `AccessController.doPrivileged` and >> `AccessControlContext` can be removed. >>

Re: RFR: 8343791: Socket.connect API should document whether the socket will be closed when hostname resolution fails or another error occurs [v12]

2024-11-21 Thread Mark Sheppard
On Thu, 21 Nov 2024 10:47:54 GMT, Volkan Yazıcı wrote: >> This PR, addressing 8343791, changes `Socket::connect()` methods to close >> the `Socket` in the event that the connection cannot be established, the >> timeout expires before the connection is established, or the socket address >> is u

Re: RFR: 8343791: Socket.connect API should document whether the socket will be closed when hostname resolution fails or another error occurs [v12]

2024-11-21 Thread Mark Sheppard
On Thu, 21 Nov 2024 10:47:54 GMT, Volkan Yazıcı wrote: >> This PR, addressing 8343791, changes `Socket::connect()` methods to close >> the `Socket` in the event that the connection cannot be established, the >> timeout expires before the connection is established, or the socket address >> is u

Re: RFR: 8343791: Socket.connect API should document whether the socket will be closed when hostname resolution fails or another error occurs [v12]

2024-11-21 Thread Mark Sheppard
On Thu, 21 Nov 2024 10:47:54 GMT, Volkan Yazıcı wrote: >> This PR, addressing 8343791, changes `Socket::connect()` methods to close >> the `Socket` in the event that the connection cannot be established, the >> timeout expires before the connection is established, or the socket address >> is u

RFR: 8344366: Remove Security Manager dependencies from javax.net.ssl and sun.security.ssl packages

2024-11-21 Thread Sean Mullan
Now that JEP 486 has been integrated, the `javax.net.ssl` and `sun.security.ssl` package implementation dependencies on `System.getSecurityManager`, `AccessController.doPrivileged` and `AccessControlContext` can be removed. Most of the changes are straightforward: removal of code calling `Syst

Re: RFR: 8344217: Remove calls to SecurityManager and doPrivileged in java.net.DatagramSocket and java.net.NetMulticastSocket after JEP 486 integration

2024-11-21 Thread Roger Riggs
On Thu, 21 Nov 2024 18:43:55 GMT, Daniel Fuchs wrote: > Please find here a patch that removes use of SecurityManager and doPrivileged > in DatagramSocket/MulticastSocket implementation. > > Some allusion to the SecurityManager was missed in DatagramSocket::connect, > so this patch contains a s

RFR: 8344217: Remove calls to SecurityManager and and doPrivileged in java.net.DatagramSocket and java.net.NetMulticastSocket after JEP 486 integration

2024-11-21 Thread Daniel Fuchs
Please find here a patch that removes use of SecurityManager and doPrivileged in DatagramSocket/MulticastSocket implementation. Some allusion to the SecurityManager was missed in DatagramSocket::connect, so this patch contains a small API documentation change that will require a CSR. --

Re: RFR: 8344652: Remove access control context text from SSLEngine and SSLSession APIs

2024-11-21 Thread Sean Mullan
On Thu, 21 Nov 2024 18:12:20 GMT, Daniel Fuchs wrote: > Looks reasonable. Good catch. I guess you will need a small CSR for those > changes? Yes, already approved: https://bugs.openjdk.org/browse/JDK-8344653 - PR Comment: https://git.openjdk.org/jdk/pull/22299#issuecomment-2491953

Re: RFR: 8344652: Remove access control context text from SSLEngine and SSLSession APIs

2024-11-21 Thread Daniel Fuchs
On Thu, 21 Nov 2024 17:36:03 GMT, Sean Mullan wrote: > Some additional text in two `javax.net.ssl` APIs related to access control > context was missed as part of JEP 483. This behavior no longer applies now > that the Security Manager is permanently disabled and has been removed. > > The imple

Re: RFR: 8344652: Remove access control context text from SSLEngine and SSLSession APIs

2024-11-21 Thread Jamil Nimeh
On Thu, 21 Nov 2024 17:36:03 GMT, Sean Mullan wrote: > Some additional text in two `javax.net.ssl` APIs related to access control > context was missed as part of JEP 483. This behavior no longer applies now > that the Security Manager is permanently disabled and has been removed. > > The imple

RFR: 8344652: Remove access control context text from SSLEngine and SSLSession APIs

2024-11-21 Thread Sean Mullan
Some additional text in two `javax.net.ssl` APIs related to access control context was missed as part of JEP 483. This behavior no longer applies now that the Security Manager is permanently disabled and has been removed. The implementation changes associated with this will be posted in a separa

Re: RFR: 8344219: Remove calls to SecurityManager and doPrivileged in java.net.SocksSocketImpl after JEP 486 integration [v3]

2024-11-21 Thread Chen Liang
On Thu, 21 Nov 2024 09:44:50 GMT, Volkan Yazıcı wrote: >> Removes `SecurityManager` et al. from `SocksSocketImpl`. `tier2` and `tier3` >> tests have passed – CI run links are available in the ticket. > > Volkan Yazıcı has updated the pull request incrementally with one additional > commit since

Re: RFR: 8344219: Remove calls to SecurityManager and doPrivileged in java.net.SocksSocketImpl after JEP 486 integration [v3]

2024-11-21 Thread Daniel Fuchs
On Thu, 21 Nov 2024 09:44:50 GMT, Volkan Yazıcı wrote: >> Removes `SecurityManager` et al. from `SocksSocketImpl`. `tier2` and `tier3` >> tests have passed – CI run links are available in the ticket. > > Volkan Yazıcı has updated the pull request incrementally with one additional > commit since

Re: RFR: 8344346: java/net/httpclient/ShutdownNow.java fails with java.lang.AssertionError: client was still running, but exited after further delay: timeout should be adjusted [v2]

2024-11-21 Thread Daniel Fuchs
> This test has been observed failing once in our CI. Adjusting the timeout > with Utils.adjustTimeout should give the test greater stability. Daniel Fuchs has updated the pull request incrementally with one additional commit since the last revision: Review feedback; Also removed unused impor

Re: RFR: 8344346: java/net/httpclient/ShutdownNow.java fails with java.lang.AssertionError: client was still running, but exited after further delay: timeout should be adjusted [v2]

2024-11-21 Thread Daniel Fuchs
On Thu, 21 Nov 2024 08:53:57 GMT, Jaikiran Pai wrote: > This looks OK to me. A minor suggestion - maybe consider adding this class to > the `@build` tag of jtreg, given how jtreg behaves for library classes. I am not sure this is necessary, the test already imports several other classes from t

Re: RFR: 8344223: Remove calls to SecurityManager and doPrivileged in java.net.URLClassLoader after JEP 486 integration [v2]

2024-11-21 Thread Alan Bateman
On Tue, 19 Nov 2024 12:42:18 GMT, Jaikiran Pai wrote: >> The new comment isn't quite right, it should say "concat the URLs to the >> resource in the modules and the class path". > >> concat the URLs to the resource in the modules and the class path > > Did you mean "concat the URLs of the "

Re: RFR: 8343791: Socket.connect API should document whether the socket will be closed when hostname resolution fails or another error occurs [v12]

2024-11-21 Thread Daniel Fuchs
On Thu, 21 Nov 2024 10:47:54 GMT, Volkan Yazıcı wrote: >> This PR, addressing 8343791, enhances `Socket#connect()` and effectively >> makes it close the `Socket` if `SocketImpl#connect()` fails with a >> >> 1. `SocketTimeoutException` >> 2. `InterruptedIOException` in an interrupted vthread >>

Re: RFR: 8343791: Socket.connect API should document whether the socket will be closed when hostname resolution fails or another error occurs [v12]

2024-11-21 Thread Volkan Yazıcı
> This PR, addressing 8343791, enhances `Socket#connect()` and effectively > makes it close the `Socket` if `SocketImpl#connect()` fails with a > > 1. `SocketTimeoutException` > 2. `InterruptedIOException` in an interrupted vthread > 3. `IOException` that is *not* an `UnknownHostException` > > O

Re: RFR: 8343791: Socket.connect API should document whether the socket will be closed when hostname resolution fails or another error occurs [v11]

2024-11-21 Thread Volkan Yazıcı
On Thu, 21 Nov 2024 10:01:57 GMT, Alan Bateman wrote: >> Volkan Yazıcı has updated the pull request incrementally with four >> additional commits since the last revision: >> >> - Revert `UHE` message change in `NioSocketImpl` >> - Remove self-reference guard in `closeSuppressingExceptions()`

Re: RFR: 8344219: Remove calls to SecurityManager and doPrivileged in java.net.SocksSocketImpl after JEP 486 integration [v2]

2024-11-21 Thread Volkan Yazıcı
On Thu, 21 Nov 2024 09:26:19 GMT, Daniel Fuchs wrote: >> src/java.base/share/classes/java/net/SocksSocketImpl.java line 288: >> >>> 286: // Connects to the SOCKS server >>> 287: try { >>> 288: delegate.connect(new InetSocketAddress(server, >>>

Re: RFR: 8344219: Remove calls to SecurityManager and doPrivileged in java.net.SocksSocketImpl after JEP 486 integration [v2]

2024-11-21 Thread Daniel Fuchs
On Thu, 21 Nov 2024 07:03:51 GMT, Jaikiran Pai wrote: >> Volkan Yazıcı has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update copyright year > > src/java.base/share/classes/java/net/SocksSocketImpl.java line 288: > >> 286:

Re: RFR: 8343791: Socket.connect API should document whether the socket will be closed when hostname resolution fails or another error occurs [v11]

2024-11-21 Thread Alan Bateman
On Thu, 21 Nov 2024 08:32:55 GMT, Volkan Yazıcı wrote: >> This PR, addressing 8343791, enhances `Socket#connect()` and effectively >> makes it close the `Socket` if `SocketImpl#connect()` fails with a >> >> 1. `SocketTimeoutException` >> 2. `InterruptedIOException` in an interrupted vthread >>

Re: RFR: 8344219: Remove calls to SecurityManager and doPrivileged in java.net.SocksSocketImpl after JEP 486 integration [v3]

2024-11-21 Thread Volkan Yazıcı
> Removes `SecurityManager` et al. from `SocksSocketImpl`. `tier2` and `tier3` > tests have passed – CI run links are available in the ticket. Volkan Yazıcı has updated the pull request incrementally with one additional commit since the last revision: Revert to using a synchronized method to

Re: RFR: 8344346: java/net/httpclient/ShutdownNow.java fails with java.lang.AssertionError: client was still running, but exited after further delay: timeout should be adjusted

2024-11-21 Thread Jaikiran Pai
On Wed, 20 Nov 2024 16:48:24 GMT, Daniel Fuchs wrote: > This test has been observed failing once in our CI. Adjusting the timeout > with Utils.adjustTimeout should give the test greater stability. This looks OK to me. A minor suggestion - maybe consider adding this class to the `@build` tag of

Re: RFR: 8343791: Socket.connect API should document whether the socket will be closed when hostname resolution fails or another error occurs [v10]

2024-11-21 Thread Volkan Yazıcı
On Wed, 20 Nov 2024 18:12:39 GMT, Alan Bateman wrote: >> Volkan Yazıcı has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Replace `UnknownHostException exception` with `var uhe` >> - Fix `connect()` Javadoc on `UHE` results in socket clo

Re: RFR: 8343791: Socket.connect API should document whether the socket will be closed when hostname resolution fails or another error occurs [v10]

2024-11-21 Thread Volkan Yazıcı
On Wed, 20 Nov 2024 18:17:25 GMT, Alan Bateman wrote: > The API + implementation changes have gone through many iterations but I > think we've got to a good place now. It should be possible to create or > update the CSR. @AlanBateman, thank you (and @dfuch, and @jaikiran) for kindly assisting

Re: RFR: 8343791: Socket.connect API should document whether the socket will be closed when hostname resolution fails or another error occurs [v11]

2024-11-21 Thread Volkan Yazıcı
> This PR, addressing 8343791, enhances `Socket#connect()` and effectively > makes it close the `Socket` if `SocketImpl#connect()` fails with a > > 1. `SocketTimeoutException` > 2. `InterruptedIOException` in an interrupted vthread > 3. `IOException` that is *not* an `UnknownHostException` > > O