Revision 20014 trunk/libraries/libDataSourceDBBaseDrivers/src/org/gvsig/data/datastores/vectorial/db/jdbc/postgresql/PostgresqlFeatureCollection.java

View differences:

PostgresqlFeatureCollection.java
89 89
	}
90 90

  
91 91
	public int size() {
92
		checkModified();
92 93
		try {
93 94
			if (this.numReg < 0){
94 95
				ResultSet r=null;
......
124 125
	}
125 126

  
126 127
	public Iterator iterator() {
127

  
128
		PostgresqlIterator dbfIter;
128
		checkModified();
129
		PostgresqlIterator dbIter;
129 130
		try {
130
			dbfIter=new PostgresqlIterator((PostgresqlStore)this.store,this.featureType,this.sql,this.fetchSize);
131
			dbIter=new PostgresqlIterator((PostgresqlStore)this.store,this.featureType,this.sql,this.fetchSize);
131 132
		} catch (ReadException e) {
132 133
			throw new RuntimeException(e);
133 134
		}
134 135

  
135
		return dbfIter;
136
		return dbIter;
136 137
	}
137 138

  
138 139
	protected class PostgresqlIterator implements Iterator{
......
181 182
		}
182 183

  
183 184
		public boolean hasNext(){
185
			checkModified();
184 186
			try {
185 187
				if (rs.isLast()){
186 188
					if (this.index == this.fetchSize){
......
207 209
		}
208 210

  
209 211
		public Object next() {
212
			checkModified();
210 213
			if (!hasNext())
211 214
				throw new NoSuchElementException();
212 215
			return nextFeature();

Also available in: Unified diff