JDK-8278263 : Remove redundant synchronized from URLStreamHandler.openConnection methods
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.net
  • Priority: P5
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-12-04
  • Updated: 2024-09-26
  • Resolved: 2022-01-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 19
19 b08Fixed
Related Reports
Relates :  
Description
Some implementations of URLStreamHandler have 'synchronized' in openConnection method:
1. sun.net.www.protocol.mailto.Handler
2. unix/sun.net.www.protocol.file.Handler
3. windows/sun.net.www.protocol.file.Handler

Handler's objects themselves are stateless objects. Such synchronization is redundant. Other implementations don't have 'synchronized'.
Comments
Changeset: c6ed2046 Author: Andrey Turbanov <aturbanov@openjdk.org> Date: 2022-01-31 12:11:03 +0000 URL: https://git.openjdk.java.net/jdk/commit/c6ed2046b4ba8eafb6b7e934b134829760d56ecd
31-01-2022