svn - r34315 - in branches/2.6.x/modules/library/jdbc: . src/main/java/org/geotools/jdbc

1 message Options
Embed this post
Permalink
svn_geotools

svn - r34315 - in branches/2.6.x/modules/library/jdbc: . src/main/java/org/geotools/jdbc

Reply Threaded More More options
Print post
Permalink
Author: aaime
Date: 2009-11-03 13:23:08 -0500 (Tue, 03 Nov 2009)
New Revision: 34315

Modified:
   branches/2.6.x/modules/library/jdbc/
   branches/2.6.x/modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCDataStore.java
Log:
GEOT-2732, JDBCDataStore is caching the type names list forever


Property changes on: branches/2.6.x/modules/library/jdbc
___________________________________________________________________
Added: svn:mergeinfo
   + /branches/2.5.x/modules/library/main/jdbc:33331
/trunk/modules/library/jdbc:34314

Modified: branches/2.6.x/modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCDataStore.java
===================================================================
--- branches/2.6.x/modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCDataStore.java 2009-11-03 18:20:32 UTC (rev 34314)
+++ branches/2.6.x/modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCDataStore.java 2009-11-03 18:23:08 UTC (rev 34315)
@@ -61,9 +61,6 @@
 import org.geotools.feature.NameImpl;
 import org.geotools.feature.simple.SimpleFeatureBuilder;
 import org.geotools.feature.visitor.CountVisitor;
-import org.geotools.feature.visitor.MaxVisitor;
-import org.geotools.feature.visitor.MinVisitor;
-import org.geotools.feature.visitor.SumVisitor;
 import org.geotools.filter.FilterCapabilities;
 import org.geotools.geometry.jts.ReferencedEnvelope;
 import org.geotools.referencing.CRS;
@@ -540,9 +537,6 @@
         } finally {
             closeSafe(cx);
         }
-
-        // reset the type name cache, there's a new type name in town
-        typeNameCache = null;
     }
 
     /**
@@ -678,21 +672,12 @@
     }
     
     /**
-     * TODO: this must be removed and replaced by a more configurable
-     * cache
-     */
-    List typeNameCache = null;
-
-    /**
      * Generates the list of type names provided by the database.
      * <p>
      * The list is generated from the underlying database metadata.
      * </p>
      */
     protected List createTypeNames() throws IOException {
-        if(typeNameCache != null)
-            return typeNameCache;
-        
         Connection cx = createConnection();
 
         /*
@@ -740,7 +725,6 @@
             closeSafe(cx);
         }
 
-        typeNameCache = typeNames;
         return typeNames;
     }
 


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
GeoTools-commits mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-commits