openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r956702 - in /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc: kernel/PreparedQueryCacheImpl.java schema/Column.java schema/ForeignKey.java
Date Mon, 21 Jun 2010 21:22:12 GMT
Author: dwoods
Date: Mon Jun 21 21:22:11 2010
New Revision: 956702

URL: http://svn.apache.org/viewvc?rev=956702&view=rev
Log:
OPENJPA-1700 FindBugs - Suspicious reference comparison of Boolean values

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Column.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/ForeignKey.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java?rev=956702&r1=956701&r2=956702&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java
Mon Jun 21 21:22:11 2010
@@ -77,7 +77,7 @@ public class PreparedQueryCacheImpl impl
             || isHinted(hints, QueryHints.HINT_IGNORE_PREPARED_QUERY)
             || isHinted(hints, QueryHints.HINT_INVALIDATE_PREPARED_QUERY))
             return Boolean.FALSE;
-        if (isCachable(id) == Boolean.FALSE)
+        if (Boolean.FALSE.equals(isCachable(id)))
             return Boolean.FALSE;
         PreparedQuery cached = get(id);
         if (cached != null)
@@ -109,7 +109,7 @@ public class PreparedQueryCacheImpl impl
 		lock();
 		try {
 			String id = q.getIdentifier();
-			if (isCachable(id) == Boolean.FALSE) {
+			if (Boolean.FALSE.equals(isCachable(id))) {
 				if (_log != null && _log.isTraceEnabled())
                     _log.trace(_loc.get("prepared-query-not-cachable", id));
 				return false;

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Column.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Column.java?rev=956702&r1=956701&r2=956702&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Column.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Column.java Mon
Jun 21 21:22:11 2010
@@ -474,7 +474,7 @@ public class Column
      * Return true if this is a NOT NULL column.
      */
     public boolean isNotNull() {
-        return _notNull == Boolean.TRUE;
+        return Boolean.TRUE.equals(_notNull);
     }
 
     /**

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/ForeignKey.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/ForeignKey.java?rev=956702&r1=956701&r2=956702&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/ForeignKey.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/ForeignKey.java
Mon Jun 21 21:22:11 2010
@@ -581,7 +581,7 @@ public class ForeignKey
         // force re-cache
         _locals = null;
         _pks = null;
-        if (_autoAssign == Boolean.FALSE)
+        if (Boolean.FALSE.equals(_autoAssign))
             _autoAssign = null;
     }
 
@@ -669,7 +669,7 @@ public class ForeignKey
         if ((_joins == null || _joins.isEmpty())
             && (_constsPK == null || _constsPK.isEmpty()))
             _pkTable = null;
-        if (remd && _autoAssign == Boolean.TRUE)
+        if (remd && Boolean.TRUE.equals(_autoAssign))
             _autoAssign = null;
         return remd;
     }



Mime
View raw message