RFR: 8254996: make jdk.net.UnixDomainPrincipal a record class

Daniel Fuchs dfuchs at openjdk.java.net
Mon Dec 7 16:50:12 UTC 2020


On Mon, 7 Dec 2020 15:32:54 GMT, Patrick Concannon <pconcannon at openjdk.org> wrote:

> Hi,
> 
> Could someone please review my code for JDK-8254996: 'make jdk.net.UnixDomainPrincipal a record class'?
> 
> `jdk.net.UnixDomainPrincipal` is a simple immutable data class that requires boilerplate methods for access. However, these methods and fields are susceptible to trivial mistakes and add to the verbosity of the class. 
> This fix replaces the data class with a record class, a new type in JDK 16, making the code more concise and easier to maintain. This code is binary compatible with the original. For the generated API doc change, please refer to the specdiff attached to the CSR.
> 
> CSR : https://bugs.openjdk.java.net/browse/JDK-8257823
> 
> Kind regards,
> Patrick

That looks fine to me Patrick. First top-level record class in the JDK!

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

Marked as reviewed by dfuchs (Reviewer).

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


More information about the net-dev mailing list