RFR: 8282536: java.net.InetAddress should be a sealed class
Aleksei Efimov
aefimov at openjdk.java.net
Mon Mar 14 16:45:26 UTC 2022
On Fri, 11 Mar 2022 16:47:46 GMT, Aleksei Efimov <aefimov at openjdk.org> wrote:
> The following fix seals the `java.net.InetAddress` class and permits only two implementations - `java.net.Inet4Address` and `java.net.Inet6Address`.
>
> No issues have been detected by regression and JCK tests.
>
> Links: [JBS](https://bugs.openjdk.java.net/browse/JDK-8282536) [CSR](https://bugs.openjdk.java.net/browse/JDK-8282880)
With only two sub-classes allowed the `InetAddress` code can be further cleaned-up by removing class loader checks. Pushed as f6901f098fe. Regression/JCK tests discovered no issues related to this change.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7789
More information about the net-dev
mailing list