Fix #1289 Matrix3f/Matrix4f equals() should require an exact class match (#1302)

master
Lou Hamersly 5 years ago committed by GitHub
parent 8e334aa756
commit c1d359ca59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      jme3-core/src/main/java/com/jme3/math/Matrix3f.java
  2. 2
      jme3-core/src/main/java/com/jme3/math/Matrix4f.java

@ -1210,7 +1210,7 @@ public final class Matrix3f implements Savable, Cloneable, java.io.Serializable
*/
@Override
public boolean equals(Object o) {
if (!(o instanceof Matrix3f)) {
if (o == null || o.getClass() != getClass()) {
return false;
}

@ -2161,7 +2161,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
*/
@Override
public boolean equals(Object o) {
if (!(o instanceof Matrix4f)) {
if (o == null || o.getClass() != getClass()) {
return false;
}

Loading…
Cancel
Save