Originated from backporting JsonTypeInfo.Value of Jackson 3.0 into Jackson 2.16 in https://github.com/FasterXML/jackson-annotations/pull/229. The equals() and hashcode() implementations of JsonTypeInfo.Value in Jackson 3.0 (master branch) could not be directly copied because of its usage of JDK7 util methods Objects.equals() and Objects.hashcode() util methods, so ended up using the internal Objects.hashcode() implementation.
Thanks but 3.0 will be based on at least Java 8 and probably later 17. No point in holding back those implementations since code should not need to be changed a lot.
Motivation
This PR is for forwards-compatiblity with 3.0. As discussed in https://github.com/FasterXML/jackson-annotations/pull/229#discussion_r1197970359, same as title. I would like to see the implemenations to be "exactly" the same.
Background
Originated from backporting
JsonTypeInfo.Value
of Jackson 3.0 into Jackson 2.16 in https://github.com/FasterXML/jackson-annotations/pull/229. Theequals()
andhashcode()
implementations ofJsonTypeInfo.Value
in Jackson 3.0 (master branch) could not be directly copied because of its usage of JDK7 util methodsObjects.equals()
andObjects.hashcode()
util methods, so ended up using the internal Objects.hashcode() implementation.