openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r955399 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/GetMapValue.java
Date Wed, 16 Jun 2010 21:25:44 GMT
Author: dwoods
Date: Wed Jun 16 21:25:44 2010
New Revision: 955399

URL: http://svn.apache.org/viewvc?rev=955399&view=rev
Log:
OPENJPA-1700 FindBugs - Possible null pointer dereference; the clss cehck against null 3 lines
up doesn't protect against a null value here

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/GetMapValue.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/GetMapValue.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/GetMapValue.java?rev=955399&r1=955398&r2=955399&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/GetMapValue.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/GetMapValue.java
Wed Jun 16 21:25:44 2010
@@ -176,7 +176,7 @@ class GetMapValue
         if (clss != null && clss.length > 1)
             throw RelationStrategies.unjoinable(field);
 
-        ClassMapping cls = (clss.length == 0) ? null : clss[0];
+        ClassMapping cls = (clss == null || clss.length == 0) ? null : clss[0];
         ForeignKey fk = strat.getJoinForeignKey(cls);
 
         // manually create a subselect for the Map's value



Mime
View raw message