From 4d5d2fb2bfaa5edeb9cd6170cf2f58d9d5f6d32f Mon Sep 17 00:00:00 2001 From: Donald Woods Date: Tue, 15 Jun 2010 02:16:27 +0000 Subject: [PATCH] OPENJPA-1700 FindBugs - A null pointer is dereferenced here. This will lead to a NullPointerException when the code is executed. git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@954696 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/openjpa/lib/conf/ProductDerivations.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java index b59450e1a..b9cd4a5a1 100644 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java @@ -451,7 +451,7 @@ public class ProductDerivations { // most specific to least for (int i = _derivations.length - 1; i >= 0; i--) { Set members = _derivations[i].getSupportedQueryHints(); - if (members != null || !members.isEmpty()) + if (members != null && !members.isEmpty()) result.addAll(members); } return result;