Skip to content

Commit a13ffa3

Browse files
committed
Merge branch 'pr/334'
2 parents ad0c158 + 2e74ea4 commit a13ffa3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bson/src/main/org/bson/codecs/DocumentCodec.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ private boolean skipField(final EncoderContext encoderContext, final String key)
166166
private void writeValue(final BsonWriter writer, final EncoderContext encoderContext, final Object value) {
167167
if (value == null) {
168168
writer.writeNull();
169-
} else if (Iterable.class.isAssignableFrom(value.getClass())) {
169+
} else if (value instanceof Iterable) {
170170
writeIterable(writer, (Iterable<Object>) value, encoderContext.getChildContext());
171-
} else if (Map.class.isAssignableFrom(value.getClass())) {
171+
} else if (value instanceof Map) {
172172
writeMap(writer, (Map<String, Object>) value, encoderContext.getChildContext());
173173
} else {
174174
Codec codec = registry.get(value.getClass());

0 commit comments

Comments
 (0)