Skip to content

Commit 56a5d9f

Browse files
committed
removed cruft
1 parent 7b30e0a commit 56a5d9f

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/main/com/mongodb/DBCollection.java

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -349,20 +349,11 @@ public final void ensureIndex( final DBObject keys , final DBObject optionsIN )
349349

350350
final String name = options.get( "name" ).toString();
351351

352-
boolean doEnsureIndex = false;
353-
if ( ! _createIndexes.contains( name ) )
354-
doEnsureIndex = true;
355-
else if ( _anyUpdateSave && ! _createIndexesAfterSave.contains( name ) )
356-
doEnsureIndex = true;
357-
358-
if ( ! doEnsureIndex )
352+
if ( _createIndexes.contains( name ) )
359353
return;
360354

361355
createIndex( keys , options );
362-
363356
_createIndexes.add( name );
364-
if ( _anyUpdateSave )
365-
_createIndexesAfterSave.add( name );
366357
}
367358

368359
/** Clears all indices that have not yet been applied to this collection. */
@@ -1011,8 +1002,5 @@ public int getOptions(){
10111002
private Map<String,Class> _internalClass = Collections.synchronizedMap( new HashMap<String,Class>() );
10121003
private ReflectionDBObject.JavaWrapper _wrapper = null;
10131004

1014-
private boolean _anyUpdateSave = false;
1015-
10161005
final private Set<String> _createIndexes = new HashSet<String>();
1017-
final private Set<String> _createIndexesAfterSave = new HashSet<String>();
10181006
}

0 commit comments

Comments
 (0)