Skip to content

Commit a6373b8

Browse files
author
Ryan
committed
changed dbget to get with a cast - added generics TODO item.
1 parent a8a4a47 commit a6373b8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/com/mongodb/Response.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,14 @@ class Response {
5656

5757
DBCallback c = collection.getDB().getMongo().getMongoOptions().dbCallbackFactory.create( collection );
5858

59-
for ( int i=0; i<_num; i++ ){
59+
for ( int i=0; i < _num; i++ ){
6060
if ( user._toGo < 5 )
6161
throw new IOException( "should have more objects, but only " + user._toGo + " bytes left" );
6262
c.reset();
6363
decoder.decode( user , c );
64-
_objects.add( c.dbget() );
64+
65+
// TODO: By moving to generics, you can remove these casts (and requirement to impl DBOBject).
66+
_objects.add( (DBObject)c.get() );
6567
}
6668

6769
if ( user._toGo != 0 )

0 commit comments

Comments
 (0)