How not to use (pattern matching with) instanceof
In the chase for non-trivial examples to illustrate possible usage of JEP 305, some people might have gone too far, I guess. In particular into the more challenging area of the
equals()
method, present in all Java objects.