RFR: 8305157: The java.util.Arrays class should be declared final

Raffaello Giulietti rgiulietti at openjdk.org
Wed Mar 29 16:12:31 UTC 2023


On Wed, 29 Mar 2023 08:13:06 GMT, Per Minborg <pminborg at openjdk.org> wrote:

> Non-instantiable utility classes should be declared `final` and have a private constructors. 
> 
> See Effective Java, Third Edition, Joshua Bloch (for example, Item 19 or Item 22).

Would it make sense to throw an `AssertionError` in the constructor? Just in case...

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

PR Comment: https://git.openjdk.org/jdk/pull/13221#issuecomment-1488903069


More information about the core-libs-dev mailing list