Revision 42488 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/DefaultIterator.java

View differences:

DefaultIterator.java
74 74
		}
75 75
	}
76 76

  
77
	public boolean hasNext() {
78
		fset.checkSourceStoreModified();
79
		return this.getIterator().hasNext();
80
	}
77
        @Override
78
        public boolean hasNext() {
79
            if (this.fset == null) {
80
                return false;
81
            }
82
            fset.checkSourceStoreModified();
83
            if (this.getIterator().hasNext()) {
84
                return true;
85
            }
86
            try {
87
                this.doDispose();
88
            } catch (BaseException ex) {
89
                throw new RuntimeException("Can't dispose iterator.",ex);
90
            }
91
            return false;
92
        }
81 93

  
94
        @Override
82 95
	public Object next() {
96
                if( fset == null ) {
97
			throw new NoSuchElementException();
98
                }
83 99
		fset.checkSourceStoreModified();
84 100
		lastFeature = null;
85 101
		if (!this.hasNext()) {

Also available in: Unified diff