Paul Benedict wrote:
Joe,
I think java.util.Objects could benefit from the "final" modifier.
Since its constructor always fails, there is no reason to subclass it
(i.e., super constructor always fails). I believe Josh's "Effective
Java" book makes such a point about static utility classes.
Paul
Hello.
Classes with only private constructors, like j.u.Objects, are
effectively final. Adding final is harmless but unnecessary in these
cases. The platform is a bit inconsistent here; j.u.Collections is
*not* marked final while j.l.Math is. In practice, it doesn't matter
very much; I'll consider final-izing j.u.Objects on the next round of edits.
-Joe