openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r955381 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationRelationMapTableFieldStrategy.java
Date Wed, 16 Jun 2010 20:59:58 GMT
Author: dwoods
Date: Wed Jun 16 20:59:58 2010
New Revision: 955381

URL: http://svn.apache.org/viewvc?rev=955381&view=rev
Log:
OPENJPA-1700 FindBugs - Null pointer dereference; changeRow was not being set before being
used.

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationRelationMapTableFieldStrategy.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationRelationMapTableFieldStrategy.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationRelationMapTableFieldStrategy.java?rev=955381&r1=955380&r2=955381&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationRelationMapTableFieldStrategy.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationRelationMapTableFieldStrategy.java
Wed Jun 16 20:59:58 2010
@@ -320,7 +320,7 @@ public class RelationRelationMapTableFie
         if (canChange && !change.isEmpty()) {
             Row changeRow = null;
             if (!field.isUni1ToMFK()) {
-                rm.getSecondaryRow(field.getTable(),
+                changeRow = rm.getSecondaryRow(field.getTable(),
                     Row.ACTION_UPDATE);
                 changeRow.whereForeignKey(field.getJoinForeignKey(), sm);
             }



Mime
View raw message