diff --git a/modules/library/main/src/main/java/org/geotools/filter/FidFilterImpl.java b/modules/library/main/src/main/java/org/geotools/filter/FidFilterImpl.java
index 92c7201..1d984e0 100644
--- a/modules/library/main/src/main/java/org/geotools/filter/FidFilterImpl.java
+++ b/modules/library/main/src/main/java/org/geotools/filter/FidFilterImpl.java
@@ -28,9 +28,9 @@ import java.util.logging.Logger;
 import org.geotools.factory.CommonFactoryFinder;
 import org.geotools.filter.expression.PropertyAccessor;
 import org.geotools.filter.expression.SimpleFeaturePropertyAccessorFactory;
+import org.geotools.filter.identity.FeatureIdImpl;
 import org.opengis.filter.FilterFactory;
 import org.opengis.filter.FilterVisitor;
-import org.opengis.filter.identity.FeatureId;
 import org.opengis.filter.identity.Identifier;
 
 /**
@@ -248,13 +248,7 @@ public class FidFilterImpl extends AbstractFilterImpl implements FidFilter {
         if(evaluate == null) {
             return false;		
         } else {
-            for(Object identifier : fids) {
-                Identifier fid = (Identifier) identifier;
-                if(fid.getID().equals(evaluate)) {
-                    return true;
-                }
-            }
-            return false;
+			return (fids.contains(new FeatureIdImpl(evaluate)));
         }
 	}
 	
