Re: RFR: 8343150: Remove URLClassLoader.getPermissions after JEP 486 integration [v3]

2024-11-22 Thread Jaikiran Pai
> Can I please get a review of this change which removes the `getPermissions()` > method from the `URLClassLoader`? This addresses > https://bugs.openjdk.org/browse/JDK-8343150. > > With the SecurityManager implementation removed through JEP 486, this method > of the `URLClassLoader` is no long

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

2024-11-22 Thread Volkan Yazıcı
> 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 > unresolved. > > `tier3` tests pass against the 9f00f61d3b7fa4

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-22 Thread Volkan Yazıcı
On Thu, 21 Nov 2024 21:50:24 GMT, Mark Sheppard wrote: >> Volkan Yazıcı has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Handle `SocketTimeoutException` in `NioSocketImpl::connect()` > > test/jdk/java/net/Socket/CloseOnFailureTest.java li

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

2024-11-22 Thread Daniel Fuchs
On Fri, 22 Nov 2024 08:44:55 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: 8344217: Remove calls to SecurityManager and doPrivileged in java.net.DatagramSocket and java.net.NetMulticastSocket after JEP 486 integration [v2]

2024-11-22 Thread Alan Bateman
On Fri, 22 Nov 2024 11:08:36 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 contain

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-22 Thread Volkan Yazıcı
On Thu, 21 Nov 2024 21:54:46 GMT, Mark Sheppard wrote: >> Volkan Yazıcı has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Handle `SocketTimeoutException` in `NioSocketImpl::connect()` > > test/jdk/java/net/Socket/CloseOnFailureTest.java li

Integrated: 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-22 Thread Daniel Fuchs
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 pull request has now been integrated. Changeset: a07b72bf Author:Daniel Fuchs URL:

Re: RFR: 8343150: Change URLClassLoader.getPermissions to return empty PermissionCollection [v4]

2024-11-22 Thread Daniel Fuchs
On Fri, 22 Nov 2024 11:21:34 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which removes the >> `getPermissions()` method from the `URLClassLoader`? This addresses >> https://bugs.openjdk.org/browse/JDK-8343150. >> >> With the SecurityManager implementation removed throu

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

2024-11-22 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

RFR: 8344854: Modernize test/jdk/java/net/URLClassLoader/RemoveJar.java

2024-11-22 Thread Eirik Bjørsnøs
Can I get a review of this test-only cleanup/speedup PR which modernizes the test `RemoveJar.java`. This test attempts a variety of class loading scenarios on a URLClassLoader and verifies that when the loader is closed, it has released its JAR file (such that it may be deleted on Windows). Ch

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

2024-11-22 Thread Daniel Fuchs
On Fri, 22 Nov 2024 07:48:04 GMT, Alan Bateman wrote: >> Daniel Fuchs has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains three additional >> commit

Re: RFR: 8343150: Remove URLClassLoader.getPermissions after JEP 486 integration [v3]

2024-11-22 Thread Daniel Fuchs
On Fri, 22 Nov 2024 11:04:35 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which removes the >> `getPermissions()` method from the `URLClassLoader`? This addresses >> https://bugs.openjdk.org/browse/JDK-8343150. >> >> With the SecurityManager implementation removed throu

Re: RFR: 8343150: Change URLClassLoader.getPermissions to return empty PermissionCollection [v3]

2024-11-22 Thread Jaikiran Pai
On Fri, 22 Nov 2024 11:04:35 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which removes the >> `getPermissions()` method from the `URLClassLoader`? This addresses >> https://bugs.openjdk.org/browse/JDK-8343150. >> >> With the SecurityManager implementation removed throu

Re: RFR: 8343150: Change URLClassLoader.getPermissions to return empty PermissionCollection [v4]

2024-11-22 Thread Jaikiran Pai
> Can I please get a review of this change which removes the `getPermissions()` > method from the `URLClassLoader`? This addresses > https://bugs.openjdk.org/browse/JDK-8343150. > > With the SecurityManager implementation removed through JEP 486, this method > of the `URLClassLoader` is no long

Re: RFR: 8343150: Change URLClassLoader.getPermissions to return empty PermissionCollection [v3]

2024-11-22 Thread Jaikiran Pai
On Fri, 22 Nov 2024 11:08:31 GMT, Daniel Fuchs wrote: >> Jaikiran Pai has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains six commits: >> >> - specify URLClassLoader to reutrn empty PermissionCollection >> - merge latest from master

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

2024-11-22 Thread Volkan Yazıcı
On Thu, 21 Nov 2024 16:16:44 GMT, Chen Liang wrote: >> Volkan Yazıcı has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revert to using a synchronized method to perform the connection > > src/java.base/share/classes/java/net/SocksSocketImpl

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

2024-11-22 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: Remove redundant suppression Co-auth

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

2024-11-22 Thread Daniel Fuchs
On Fri, 22 Nov 2024 09:32:43 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: 8344854: Modernize test/jdk/java/net/URLClassLoader/RemoveJar.java

2024-11-22 Thread Daniel Fuchs
On Fri, 22 Nov 2024 10:55:37 GMT, Eirik Bjørsnøs wrote: > Can I get a review of this test-only cleanup/speedup PR which modernizes the > test `RemoveJar.java`. > > This test attempts a variety of class loading scenarios on a URLClassLoader > and verifies that when the loader is closed, it has

Re: RFR: 8344855: Remove calls to SecurityManager and doPrivileged in HTTP related implementation classes in the sun.net and sun.net.www.http packages after JEP 486 integration

2024-11-22 Thread Volkan Yazıcı
On Fri, 22 Nov 2024 12:58:11 GMT, Daniel Fuchs wrote: > Some further cleaning in the legacy HTTP implementation. > Usual removal of doPrivileged, GetPropertyAction, checkPermission, etc... > > I also took the opportunity to also remove some constructors that were never > called in the legacy H

Re: RFR: 8344854: Modernize test/jdk/java/net/URLClassLoader/RemoveJar.java

2024-11-22 Thread Eirik Bjørsnøs
On Fri, 22 Nov 2024 13:57:17 GMT, Daniel Fuchs wrote: > Hi Eirik, IIRC the cache is global - so I don't think running the test in the > same VM will work. I mean, I don't think we will be testing the same thing. That is a fair point. On the other hand; the test asserts that the file can be del

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

2024-11-22 Thread Alexey Bakhtin
On Fri, 22 Nov 2024 16:39:49 GMT, Sean Mullan wrote: >> Yes, you are right, javadoc is the same. So, not entirely correct about API. >> But the same exact place in the KeyManagerFactory is not modified. I do not >> know the exact policy about references in the javadoc. I prefer to have a >> ful

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

2024-11-22 Thread Mark Sheppard
On Fri, 22 Nov 2024 09:32:43 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 [v13]

2024-11-22 Thread Mark Sheppard
On Fri, 22 Nov 2024 09:32:43 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: 8344366: Remove Security Manager dependencies from javax.net.ssl and sun.security.ssl packages [v2]

2024-11-22 Thread Hai-May Chao
On Fri, 22 Nov 2024 16:38:01 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. >> >

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

2024-11-22 Thread Mark Sheppard
On Fri, 22 Nov 2024 09:32:43 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

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

2024-11-22 Thread Sean Mullan
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: 8344366: Remove Security Manager dependencies from javax.net.ssl and sun.security.ssl packages [v2]

2024-11-22 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 ca

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

2024-11-22 Thread Sean Mullan
On Thu, 21 Nov 2024 23:21:35 GMT, Alexey Bakhtin wrote: >> Why do you think it is an API change? It produces the exact same javadoc. >> Technically it's not related, but minor cleanup changes like this are ok in >> my opinion. > > Yes, you are right, javadoc is the same. So, not entirely correc

Integrated: 8344525: Fix leftover ExceptionOccurred in java.base

2024-11-22 Thread Justin Lu
On Wed, 20 Nov 2024 03:02:39 GMT, Justin Lu wrote: > Please review this PR which removes the leftover ocurrences of incorrect JNI > `ExceptionOccurred(env)` usage within _java.base_. > > This PR also includes 9 cases of `if (ExceptionOccurred(env) == NULL)`. While > these occurrences are fine

Re: RFR: 8344525: Fix leftover ExceptionOccurred in java.base

2024-11-22 Thread Justin Lu
On Wed, 20 Nov 2024 03:02:39 GMT, Justin Lu wrote: > Please review this PR which removes the leftover ocurrences of incorrect JNI > `ExceptionOccurred(env)` usage within _java.base_. > > This PR also includes 9 cases of `if (ExceptionOccurred(env) == NULL)`. While > these occurrences are fine

Re: RFR: 8343150: Change URLClassLoader.getPermissions to return empty PermissionCollection [v4]

2024-11-22 Thread Jaikiran Pai
On Fri, 22 Nov 2024 11:21:34 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which removes the >> `getPermissions()` method from the `URLClassLoader`? This addresses >> https://bugs.openjdk.org/browse/JDK-8343150. >> >> With the SecurityManager implementation removed throu

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

2024-11-22 Thread Sean Mullan
On Fri, 22 Nov 2024 12:53:14 GMT, Sean Coffey wrote: >> Sean Mullan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revert @see text in TrustManagerFactory. >> Remove sun.security.action.OpenFileInputStreamAction. > > src/java.base/sha

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

2024-11-22 Thread Sean Coffey
On Fri, 22 Nov 2024 16:38:01 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. >> >

RFR: 8344222: Remove calls to SecurityManager and doPrivileged in java.net.HttpURLConnection, java.net.HttpConnectSocketImpl, and javax.net.HttpsURLConnection after JEP 486 integration

2024-11-22 Thread Volkan Yazıcı
Addresses [8344222](https://bugs.openjdk.org/browse/JDK-8344222) and removes `SecurityManager` and `doPrivileged()` usages from `Http(s)URLConnection` and `HttpConnectSocketImpl`. `tier2` and `tier3` results are on their way. - Commit messages: - Remove `SM` et al. from `HttpURLCon

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

2024-11-22 Thread duke
On Fri, 22 Nov 2024 08:44:55 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

Integrated: 8344219: Remove calls to SecurityManager and doPrivileged in java.net.SocksSocketImpl after JEP 486 integration

2024-11-22 Thread Volkan Yazıcı
On Wed, 20 Nov 2024 10:29: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. This pull request has now been integrated. Changeset: 15dbb6a3 Author:Volkan Yazıcı Committ

Re: RFR: 8343150: Change URLClassLoader.getPermissions to return empty PermissionCollection [v4]

2024-11-22 Thread Alan Bateman
On Fri, 22 Nov 2024 11:21:34 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which removes the >> `getPermissions()` method from the `URLClassLoader`? This addresses >> https://bugs.openjdk.org/browse/JDK-8343150. >> >> With the SecurityManager implementation removed throu

RFR: 8344855: Remove calls to SecurityManager and doPrivileged in HTTP related implementation classes in the sun.net and sun.net.www.http packages after JEP 486 integration

2024-11-22 Thread Daniel Fuchs
Some further cleaning in the legacy HTTP implementation. Usual removal of doPrivileged, GetPropertyAction, checkPermission, etc... I also took the opportunity to also remove some constructors that were never called in the legacy HttpClient, and to fix some throws signatures. - Comm

Re: RFR: 8344855: Remove calls to SecurityManager and doPrivileged in HTTP related implementation classes in the sun.net and sun.net.www.http packages after JEP 486 integration

2024-11-22 Thread Daniel Fuchs
On Fri, 22 Nov 2024 13:15:27 GMT, Volkan Yazıcı wrote: >> Some further cleaning in the legacy HTTP implementation. >> Usual removal of doPrivileged, GetPropertyAction, checkPermission, etc... >> >> I also took the opportunity to also remove some constructors that were never >> called in the le

Re: RFR: 8344855: Remove calls to SecurityManager and doPrivileged in HTTP related implementation classes in the sun.net and sun.net.www.http packages after JEP 486 integration

2024-11-22 Thread Daniel Fuchs
On Fri, 22 Nov 2024 14:09:34 GMT, Volkan Yazıcı wrote: >> Some further cleaning in the legacy HTTP implementation. >> Usual removal of doPrivileged, GetPropertyAction, checkPermission, etc... >> >> I also took the opportunity to also remove some constructors that were never >> called in the le

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

2024-11-22 Thread Sean Coffey
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: 8344855: Remove calls to SecurityManager and doPrivileged in HTTP related implementation classes in the sun.net and sun.net.www.http packages after JEP 486 integration [v2]

2024-11-22 Thread Daniel Fuchs
> Some further cleaning in the legacy HTTP implementation. > Usual removal of doPrivileged, GetPropertyAction, checkPermission, etc... > > I also took the opportunity to also remove some constructors that were never > called in the legacy HttpClient, and to fix some throws signatures. Daniel Fu

Re: RFR: 8344222: Remove calls to SecurityManager and doPrivileged in java.net.HttpURLConnection, java.net.HttpConnectSocketImpl, and javax.net.HttpsURLConnection after JEP 486 integration

2024-11-22 Thread Daniel Fuchs
On Fri, 22 Nov 2024 14:31:21 GMT, Volkan Yazıcı wrote: > Addresses [8344222](https://bugs.openjdk.org/browse/JDK-8344222) and removes > `SecurityManager` and `doPrivileged()` usages from `Http(s)URLConnection` and > `HttpConnectSocketImpl`. `tier2` and `tier3` results are on their way. LGTM -

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

2024-11-22 Thread Anthony Scarpino
On Fri, 22 Nov 2024 16:38:01 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. >> >