Details
Description
The class DuplicatingFilterVisitor contains an instanceof check in visit(Id, Object) that can never evaluate to true:
public Object visit(Id filter, Object extraData) { if (filter instanceof FeatureId) { FeatureId featureId = (FeatureId) filter; return getFactory(extraData).featureId(featureId.getID()); } return getFactory(extraData).id(filter.getIdentifiers()); }
problem is org.opengis.filter.identity.FeatureId does not extend Filter so the instanceof check will never be true. That if block is seems like plain dead code, and it is ok for the method body to be just the last line.
and btw, the class does not have a single unit test