svn - r34260 - trunk/modules/library/main/src/main/java/org/geotools/filter

1 message Options
Embed this post
Permalink
svn_geotools

svn - r34260 - trunk/modules/library/main/src/main/java/org/geotools/filter

Reply Threaded More More options
Print post
Permalink
Author: aaime
Date: 2009-10-27 00:34:37 -0400 (Tue, 27 Oct 2009)
New Revision: 34260

Modified:
   trunk/modules/library/main/src/main/java/org/geotools/filter/FilterAttributeExtractor.java
Log:
Basic type safety in the returned values

Modified: trunk/modules/library/main/src/main/java/org/geotools/filter/FilterAttributeExtractor.java
===================================================================
--- trunk/modules/library/main/src/main/java/org/geotools/filter/FilterAttributeExtractor.java 2009-10-27 03:57:08 UTC (rev 34259)
+++ trunk/modules/library/main/src/main/java/org/geotools/filter/FilterAttributeExtractor.java 2009-10-27 04:34:37 UTC (rev 34260)
@@ -35,7 +35,7 @@
  */
 public class FilterAttributeExtractor extends DefaultFilterVisitor {
     /** Last set visited */
-    protected Set attributeNames = new HashSet();
+    protected Set<String> attributeNames = new HashSet<String>();
     /** feature type to evaluate against */
     protected SimpleFeatureType featureType;
 
@@ -59,7 +59,7 @@
      *
      * @return an unmofiable set of the attribute names found so far during the visit
      */
-    public Set getAttributeNameSet() {
+    public Set<String> getAttributeNameSet() {
         return Collections.unmodifiableSet(attributeNames);
     }
 
@@ -76,12 +76,12 @@
      * Resets the attributes found so that a new attribute search can be performed
      */
     public void clear() {
-        attributeNames = new HashSet();
+        attributeNames = new HashSet<String>();
     }
 
     public Object visit( PropertyName expression, Object data ) {
         if( data != null && data != attributeNames ){
-            attributeNames = (Set) data;
+            attributeNames = (Set<String>) data;
         }
         if (featureType != null) {
             //evaluate against the feature type instead of using straight name


------------------------------------------------------------------------------
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