Skip to content

Commit 9f72162

Browse files
authored
Merge pull request #49 from cognitect/issue-47
[Bug] Remove impossible bounds checking.
2 parents 3ff5b4f + 30e9dfd commit 9f72162

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

src/main/java/com/cognitect/transit/impl/MsgpackEmitter.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,12 @@ public void emitBoolean(boolean b, boolean asMapKey, WriteCache cache) throws Ex
6060
@Override
6161
public void emitInteger(Object o, boolean asMapKey, WriteCache cache) throws Exception {
6262
long i = Util.numberToPrimitiveLong(o);
63-
if ((i > Long.MAX_VALUE) || (i < Long.MIN_VALUE))
64-
this.emitString(Constants.ESC_STR, "i", o.toString(), asMapKey, cache);
6563
this.gen.packLong(i);
6664
}
6765

6866

6967
@Override
7068
public void emitInteger(long i, boolean asMapKey, WriteCache cache) throws Exception {
71-
if ((i > Long.MAX_VALUE) || (i < Long.MIN_VALUE))
72-
this.emitString(Constants.ESC_STR, "i", String.valueOf(i), asMapKey, cache);
7369
this.gen.packLong(i);
7470
}
7571

0 commit comments

Comments
 (0)