OPENJPA-1700 FindBugs - Possible null pointer dereference; the clss cehck against null 3 lines up doesn't protect against a null value here

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@955399 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Donald Woods 2010-06-16 21:25:44 +00:00
parent 13002d2025
commit bc67e474bc

View File

@ -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