openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r954696 - /openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java
Date Tue, 15 Jun 2010 02:16:27 GMT
Author: dwoods
Date: Tue Jun 15 02:16:27 2010
New Revision: 954696

URL: http://svn.apache.org/viewvc?rev=954696&view=rev
Log:
OPENJPA-1700 FindBugs - A null pointer is dereferenced here.  This will lead to a NullPointerException
when the code is executed.

Modified:
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java?rev=954696&r1=954695&r2=954696&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java
(original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java
Tue Jun 15 02:16:27 2010
@@ -451,7 +451,7 @@ public class ProductDerivations {
         // most specific to least
         for (int i = _derivations.length - 1; i >= 0; i--) {
             Set<String> members = _derivations[i].getSupportedQueryHints();
-            if (members != null || !members.isEmpty())
+            if (members != null && !members.isEmpty())
                 result.addAll(members);
         }
         return result;



Mime
View raw message