openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1768191 - /openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/CriteriaQueryImpl.java
Date Sat, 05 Nov 2016 11:25:29 GMT
Author: struberg
Date: Sat Nov  5 11:25:29 2016
New Revision: 1768191

URL: http://svn.apache.org/viewvc?rev=1768191&view=rev
Log:
OPENJPA-2675 implement null-check for CriteriaQueryImpl#equals

txs to Kaloyan Spiridonov for the catch!

Modified:
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/CriteriaQueryImpl.java

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/CriteriaQueryImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/CriteriaQueryImpl.java?rev=1768191&r1=1768190&r2=1768191&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/CriteriaQueryImpl.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/CriteriaQueryImpl.java
Sat Nov  5 11:25:29 2016
@@ -736,6 +736,10 @@ class CriteriaQueryImpl<T> implements Op
     }
     
     public boolean equals(Object other) {
+        if(other == null) {
+            return false;
+        }
+        
         if (toString().equals(other.toString()))
             return true;
         return false;



Mime
View raw message