From 701a4e7d2715b844f3b522400eee2024b1aac049 Mon Sep 17 00:00:00 2001 From: Mark Struberg Date: Sat, 5 Nov 2016 11:25:29 +0000 Subject: [PATCH] OPENJPA-2675 implement null-check for CriteriaQueryImpl#equals txs to Kaloyan Spiridonov for the catch! git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1768191 13f79535-47bb-0310-9956-ffa450edef68 --- .../openjpa/persistence/criteria/CriteriaQueryImpl.java | 4 ++++ 1 file changed, 4 insertions(+) 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;