DBObject#keySet is inefficient for instances of BasicBSONList. But currently decoding into DBObject relies on the keySet method to determine if a DBObject should be replaced with a DBRef. This reliance is unnecessary in the case of a BasicBSONList and should be removed.
In general, there is little reason for an application to enumerate the keys of a BSON array.
Please compare the StringRangeSet implementations in the mongo-java-driver 2.x and 3.x and consider throwing out the 3.x version and replace it with 2.x.