diff --git a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/CriteriaQueryImpl.java b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/CriteriaQueryImpl.java index e2c673dab..498ca75be 100644 --- a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/CriteriaQueryImpl.java +++ b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/CriteriaQueryImpl.java @@ -736,6 +736,10 @@ class CriteriaQueryImpl implements OpenJPACriteriaQuery, AliasContext { } public boolean equals(Object other) { + if(other == null) { + return false; + } + if (toString().equals(other.toString())) return true; return false;