We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e87dabe commit cef63ebCopy full SHA for cef63eb
1 file changed
src/main/com/mongodb/util/JSON.java
@@ -2,14 +2,15 @@
2
3
package com.mongodb.util;
4
5
-import com.mongodb.*;
6
-import org.bson.*;
7
-import org.bson.types.*;
8
-
9
import java.text.*;
10
import java.util.*;
11
import java.util.regex.*;
12
+import org.bson.*;
+import org.bson.types.*;
+
+import com.mongodb.*;
13
14
/**
15
* Helper methods for JSON serialization and de-serialization
16
*/
@@ -69,12 +70,12 @@ public static void serialize( Object o , StringBuilder buf ){
69
70
return;
71
}
72
- if ( o instanceof Collection){
73
+ if ( o instanceof Iterable){
74
75
boolean first = true;
76
buf.append( "[ " );
77
- for ( Object n : (Collection)o ){
78
+ for ( Object n : (Iterable)o ){
79
if ( first ) first = false;
80
else buf.append( " , " );
81
0 commit comments