Skip to content

Commit 188fe8e

Browse files
scotthernandezerh
authored andcommitted
mend
1 parent 42b9b27 commit 188fe8e

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/main/org/bson/BSONEncoder.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,11 @@ protected void putNumber( String name , Number n ){
257257
_put( NUMBER_INT , name );
258258
_buf.writeInt( n.intValue() );
259259
}
260-
else if ( n instanceof Long || n instanceof AtomicLong || n.getClass().equals(long.class) ) {
260+
else if ( n instanceof Long || n instanceof AtomicLong ) {
261261
_put( NUMBER_LONG , name );
262262
_buf.writeLong( n.longValue() );
263263
}
264-
else if ( n instanceof Float || n instanceof Double ||
265-
n.getClass().equals(double.class) ||
266-
n.getClass().equals(float.class)) {
264+
else if ( n instanceof Float || n instanceof Double ) {
267265
_put( NUMBER , name );
268266
_buf.writeDouble( n.doubleValue() );
269267
}

0 commit comments

Comments
 (0)