openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r956693 - in /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta: MappingInfo.java MappingTool.java
Date Mon, 21 Jun 2010 21:01:35 GMT
Author: dwoods
Date: Mon Jun 21 21:01:34 2010
New Revision: 956693

URL: http://svn.apache.org/viewvc?rev=956693&view=rev
Log:
OPENJPA-1700 FindBugs - extraneous checks for null as a NPE would have already occurred

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingInfo.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingTool.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingInfo.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingInfo.java?rev=956693&r1=956692&r2=956693&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingInfo.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingInfo.java
Mon Jun 21 21:01:34 2010
@@ -1349,8 +1349,7 @@ public abstract class MappingInfo
         boolean adapt, boolean fill) {
         // default to the primary key column name if this is a pk join
         DBIdentifier name = given.getIdentifier();
-        if (DBIdentifier.isNull(name) && given != null
-            && given.getFlag(Column.FLAG_PK_JOIN) && cls != null) {
+        if (DBIdentifier.isNull(name) && given.getFlag(Column.FLAG_PK_JOIN) &&
cls != null) {
             Column[] pks = cls.getPrimaryKeyColumns();
             if (pks.length == 1)
                 name = pks[0].getIdentifier();

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingTool.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingTool.java?rev=956693&r1=956692&r2=956693&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingTool.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingTool.java
Mon Jun 21 21:01:34 2010
@@ -1019,7 +1019,7 @@ public class MappingTool
                 getMetaDataFactory().newClassArgParser();
             classParser.setClassLoader(loader);
             Class<?>[] parsed;
-            for (int i = 0; args != null && i < args.length; i++) {
+            for (int i = 0; i < args.length; i++) {
                 parsed = classParser.parseTypes(args[i]);
                 classes.addAll(Arrays.asList(parsed));
             }



Mime
View raw message