File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -181,8 +181,8 @@ public void doapply( DBObject o ){
181
181
182
182
@ Override
183
183
public void drop () throws MongoException {
184
- super .drop ();
185
184
_collections .remove (getName ());
185
+ super .drop ();
186
186
}
187
187
188
188
public WriteResult insert (DBObject [] arr , com .mongodb .WriteConcern concern )
Original file line number Diff line number Diff line change @@ -674,9 +674,11 @@ public void dropIndexes( String name )
674
674
.add ( "index" , name )
675
675
.get ();
676
676
677
+ resetIndexCache ();
677
678
CommandResult res = _db .command ( cmd );
679
+ if (res .ok () || res .getErrorMessage ().equals ( "ns not found" ))
680
+ return ;
678
681
res .throwOnError ();
679
- resetIndexCache ();
680
682
}
681
683
682
684
/**
@@ -685,9 +687,11 @@ public void dropIndexes( String name )
685
687
*/
686
688
public void drop ()
687
689
throws MongoException {
690
+ resetIndexCache ();
688
691
CommandResult res =_db .command ( BasicDBObjectBuilder .start ().add ( "drop" , getName () ).get () );
692
+ if (res .ok () || res .getErrorMessage ().equals ( "ns not found" ))
693
+ return ;
689
694
res .throwOnError ();
690
- resetIndexCache ();
691
695
}
692
696
693
697
/**
Original file line number Diff line number Diff line change 4
4
5
5
<test name =" main tests" >
6
6
<classes >
7
- <class name =" com.mongodb.util.StringRangeSetTest" />
8
7
<class name =" com.mongodb.util.SimplePoolTest" />
9
8
<class name =" com.mongodb.util.JSONTest" />
10
9
14
13
<class name =" org.bson.BSONTest" />
15
14
16
15
<class name =" org.bson.util.ClassMapTest" />
16
+ <class name =" org.bson.util.StringRangeSetTest" />
17
17
18
18
<class name =" com.mongodb.ByteTest" />
19
19
<class name =" com.mongodb.BasicDBObjectTest" />
You can’t perform that action at this time.
0 commit comments