RFR: 8235139: Remove the socket impl factory mechanism [v2]

Alan Bateman alanb at openjdk.java.net
Thu Feb 4 15:30:44 UTC 2021


On Thu, 4 Feb 2021 12:18:07 GMT, Patrick Concannon <pconcannon at openjdk.org> wrote:

>> Hi,
>> 
>> Could someone please review my proposed changeset for JDK-8235139: '`Remove the socket impl factory mechanism`' ?
>> 
>> These changes propose to deprecate (for the eventual removal) the API points for statically configuring a system-wide factory for the `Socket`, `ServerSocket`, and `DatagramSocket` types in the `java.net package`. Specifically, the following:
>> 
>> **Methods**:
>> - `static void Socket.setSocketImplFactory​(SocketImplFactory fac)`
>> - `static void ServerSocket.setSocketFactory​(SocketImplFactory fac)`
>> - `static void DatagramSocket.setDatagramSocketImplFactory​(DatagramSocketImplFactory fac)`
>> 
>> **Types**:
>> - `java.net SocketImplFactory`
>> - `java.net DatagramSocketImplFactory`
>> 
>> The CSR for[ JDK-8220494](https://bugs.openjdk.java.net/browse/JDK-8220494) contains some verbiage about the potential
>> issues that setting factories can have, and alludes to their possible
>> future removal. 
>> 
>> Kind regards,
>> Patrick
>
> Patrick Concannon 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 commits since the last revision:
> 
>  - 8235139: Updated @deprecated text for setSocketFactory methods in Socket and ServerSocket
>  - Merge remote-tracking branch 'origin/master' into JDK-8235139
>  - 8235139: Remove the socket impl factory mechanism

Deprecating the 3 static factory methods is good.
I see you've also added the Deprecated annotation to the private static fields too. Is this left over from a previous iteration?

-------------

Marked as reviewed by alanb (Reviewer).

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


More information about the net-dev mailing list