openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p..@apache.org
Subject svn commit: r563357 - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/ openjpa-kernel/src/main/java/org/apache/openjpa/datacache/ openjpa-kernel/src/main/java/org/apache/openjpa/meta/
Date Tue, 07 Aug 2007 00:19:54 GMT
Author: pcl
Date: Mon Aug  6 17:19:53 2007
New Revision: 563357

URL: http://svn.apache.org/viewvc?view=rev&rev=563357
Log:
feedback from Bill Pugh of FindBugs fame

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/ResultSetResult.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheScheduler.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/ResultSetResult.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/ResultSetResult.java?view=diff&rev=563357&r1=563356&r2=563357
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/ResultSetResult.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/ResultSetResult.java
Mon Aug  6 17:19:53 2007
@@ -422,8 +422,7 @@
                     if (col.getType() == Types.BLOB
                         || col.getType() == Types.VARBINARY) {
                         return _dict
-                            .getBlobObject(_rs, ((Number) obj).intValue(),
-                                _store);
+                            .getBlobObject(_rs, col.getIndex(), _store);
                     }
                 }
                 return _dict.getObject(_rs, ((Number) obj).intValue(), null);
@@ -449,7 +448,7 @@
     protected String getStringInternal(Object obj, Joins joins)
         throws SQLException {
         if (obj instanceof Column && ((Column) obj).getType() == Types.CLOB)
-            return _dict.getClobString(_rs, ((Number) obj).intValue());
+            return _dict.getClobString(_rs, ((Column) obj).getIndex());
         return _dict.getString(_rs, ((Number) obj).intValue());
     }
 

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheScheduler.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheScheduler.java?view=diff&rev=563357&r1=563356&r2=563357
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheScheduler.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheScheduler.java
Mon Aug  6 17:19:53 2007
@@ -50,8 +50,6 @@
     private static final Localizer _loc = Localizer.forPackage
         (DataCacheScheduler.class);
 
-    private static final DateFormat _fom = new SimpleDateFormat("E HH:mm:ss");
-
     private Map _caches = new ConcurrentHashMap();
     private boolean _stop = false;
     private int _interval = 2;
@@ -121,6 +119,7 @@
             _log.trace(_loc.get("scheduler-interval", _interval + ""));
 
         Date lastRun = new Date();
+        DateFormat fom = new SimpleDateFormat("E HH:mm:ss");
         while (!isStopped()) {
             try {
                 Thread.sleep(_interval * 60 * 1000);
@@ -136,7 +135,7 @@
                     if (schedule.matches(lastRun, now)) {
                         if (_log.isTraceEnabled())
                             _log.trace(_loc.get("scheduler-clear",
-                                cache.getName(), _fom.format(now)));
+                                cache.getName(), fom.format(now)));
                         evict(cache);
                     }
                 }

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java?view=diff&rev=563357&r1=563356&r2=563357
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java
Mon Aug  6 17:19:53 2007
@@ -1564,6 +1564,10 @@
             getFullName(true));
     }
 
+    public int hashCode() {
+        return getFullName(true).hashCode();
+    }
+
     public int compareTo(Object other) {
         if (other == null)
             return 1;
@@ -2000,7 +2004,7 @@
         private transient Member _member;
         
         private MemberProvider(Member member) {
-            if (_member instanceof Constructor)
+            if (member instanceof Constructor)
                 throw new IllegalArgumentException();
 
             _member = member;



Mime
View raw message