Re: RFR: 8278263: Remove redundant synchronized from URLStreamHandler.openConnection methods

2022-01-27 Thread Daniel Fuchs
On Fri, 12 Nov 2021 19:35:10 GMT, Andrey Turbanov  wrote:

> All this Handler's are stateless and there is nothing to protect via 
> synchronization.

There should be no code outside of the JDK extending those classes, especially 
with strong encapsulation in place.
I believe this is good to go!

-

PR: https://git.openjdk.java.net/jdk/pull/6373


Re: RFR: 8278263: Remove redundant synchronized from URLStreamHandler.openConnection methods

2022-01-26 Thread Florent Guillaume
On Wed, 26 Jan 2022 09:38:58 GMT, Alan Bateman  wrote:

> Are you thinking about code that extends the sun.* classes?

Yes that was my idea, but indeed if there's no way for them to be extended by 
user code it's probably not an issue.

-

PR: https://git.openjdk.java.net/jdk/pull/6373


Re: RFR: 8278263: Remove redundant synchronized from URLStreamHandler.openConnection methods

2022-01-26 Thread Alan Bateman
On Tue, 25 Jan 2022 21:01:42 GMT, Florent Guillaume  
wrote:

> In theory a subclass overloading using a non-synchronized `openConnection(URL 
> u, Proxy p)` could have relied on `openConnection(URL u)` delegating to it 
> and having been synchronized. So maybe this requires a small CSR?

The changes are to the JDK internal classes that implement the file and mailto 
protocol handlers. Are you thinking about code that extends the sun.* classes 
or some other scenario?

-

PR: https://git.openjdk.java.net/jdk/pull/6373


Re: RFR: 8278263: Remove redundant synchronized from URLStreamHandler.openConnection methods

2022-01-25 Thread Florent Guillaume
On Fri, 12 Nov 2021 19:35:10 GMT, Andrey Turbanov  wrote:

> All this Handler's are stateless and there is nothing to protect via 
> synchronization.

In theory a subclass overloading using a non-synchronized `openConnection(URL 
u, Proxy p)` could have relied on `openConnection(URL u)` delegating to it and 
having been synchronized. So maybe this requires a small CSR?

-

PR: https://git.openjdk.java.net/jdk/pull/6373


Re: RFR: 8278263: Remove redundant synchronized from URLStreamHandler.openConnection methods

2022-01-25 Thread Daniel Fuchs
On Fri, 12 Nov 2021 19:35:10 GMT, Andrey Turbanov  wrote:

> All this Handler's are stateless and there is nothing to protect via 
> synchronization.

LGTM. Please integrate and drop me a note and I will sponsor it.

-

Marked as reviewed by dfuchs (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/6373


Re: RFR: 8278263: Remove redundant synchronized from URLStreamHandler.openConnection methods

2021-12-06 Thread Daniel Fuchs
On Fri, 12 Nov 2021 19:35:10 GMT, Andrey Turbanov  wrote:

> All this Handler's are stateless and there is nothing to protect via 
> synchronization.

Seems reasonable but I'd prefer if this were being pushed in 19 after RDP1.

-

PR: https://git.openjdk.java.net/jdk/pull/6373