Revision 46696 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/featureset/FilteredIterator.java

View differences:

FilteredIterator.java
124 124
		return this.current != null;
125 125
	}
126 126

  
127
        protected boolean toBooleanMatch(Object x) {
128
            if( x == null ) {
129
                return false;
130
            } else if( x instanceof Boolean ) {
131
                return ((Boolean) x);
132
            } else {
133
                return true;
134
            }
135
        }
136
        
127 137
	public boolean match(DefaultFeature feature) throws DataException {
128 138
		try {
129 139
			if (filter==null) {
130 140
                            return true;
131 141
			}
132 142
                        Object x = this.filter.evaluate(feature);
133
                        if( x == null ) {
134
                            return false;
135
                        } else if( x instanceof Boolean ) {
136
                            return ((Boolean) x);
137
                        } else {
138
                            return true;
139
                        }
143
                        return toBooleanMatch(x);
140 144
		} catch (Exception e) {
141 145
			throw new DataEvaluatorException(e);
142 146
		}

Also available in: Unified diff