Skip to content

Commit ccd8a9d

Browse files
start deprecating for future versions (3.0)
1 parent 82195ae commit ccd8a9d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/main/com/mongodb/DBCollection.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ public WriteResult remove( DBObject o )
212212
* @throws MongoException
213213
* @dochub find
214214
*/
215+
@Deprecated
215216
public final DBCursor find( DBObject query , DBObject fields , int numToSkip , int batchSize , int options ) throws MongoException{
216217
return find(query, fields, numToSkip, batchSize).addOption(options);
217218
}
@@ -230,8 +231,9 @@ public final DBCursor find( DBObject query , DBObject fields , int numToSkip , i
230231
* @throws MongoException
231232
* @dochub find
232233
*/
233-
public final DBCursor find( DBObject ref , DBObject fields , int numToSkip , int batchSize ) {
234-
DBCursor cursor = find(ref, fields).skip(numToSkip).batchSize(batchSize);
234+
@Deprecated
235+
public final DBCursor find( DBObject query , DBObject fields , int numToSkip , int batchSize ) {
236+
DBCursor cursor = find(query, fields).skip(numToSkip).batchSize(batchSize);
235237
return cursor;
236238
}
237239

src/test/com/mongodb/DBCursorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ public void testBig(){
121121
assertEquals( numToInsert , c.find().batchSize(2).itcount() );
122122
assertEquals( numToInsert , c.find().batchSize(1).itcount() );
123123

124-
assertEquals( numToInsert , _count( c.find( null , null , 0 , 5 ) ) );
125-
assertEquals( 5 , _count( c.find( null , null , 0 , -5 ) ) );
124+
assertEquals( numToInsert , _count( c.find( null , null).skip( 0 ).batchSize( 5 ) ) );
125+
assertEquals( 5 , _count( c.find( null , null).skip( 0 ).batchSize( -5 ) ) );
126126
}
127127

128128
@SuppressWarnings("unchecked")

0 commit comments

Comments
 (0)