JDBCDataStore is caching the type names list forever ----------------------------------------------------
Key: GEOT-2732 URL: http://jira.codehaus.org/browse/GEOT-2732 Project: GeoTools Issue Type: Bug Affects Versions: 2.5.7 Reporter: Andrea Aime Fix For: 2.5.8, 2.6-M2 This is a mistake of mine, I've committed and experiment that should not have been committed. This patch amends it: {code:java} ### Eclipse Workspace Patch 1.0 #P gt-jdbc Index: src/main/java/org/geotools/jdbc/JDBCDataStore.java =================================================================== --- src/main/java/org/geotools/jdbc/JDBCDataStore.java (revisione 33977) +++ src/main/java/org/geotools/jdbc/JDBCDataStore.java (copia locale) @@ -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; @@ -538,9 +535,6 @@ } finally { closeSafe(cx); } - - // reset the type name cache, there's a new type name in town - typeNameCache = null; } /** @@ -676,21 +670,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(); /* @@ -738,7 +723,6 @@ closeSafe(cx); } - typeNameCache = typeNames; return typeNames; } {code} -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Come build with us! The BlackBerry® 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/devconf _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel