Removed references to Objects.equals() for JDK 6 compatibility.