Skip to content

Commit fbff0af

Browse files
committed
fixed unpackLong
1 parent 515124d commit fbff0af

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

src/main/java/org/msgpack/unpacker/LongAccept.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void acceptInteger(int v) {
3939

4040
@Override
4141
void acceptInteger(long v) {
42-
this.value = (int)v;
42+
this.value = v;
4343
}
4444

4545
@Override

src/test/java/org/msgpack/TestBufferPackUnpack.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void testLong(long v) throws Exception {
6363
byte[] bytes = packer.toByteArray();
6464
BufferUnpacker unpacker = new BufferUnpacker();
6565
unpacker.wrap(bytes);
66-
int ret = unpacker.readInt();
66+
long ret = unpacker.readLong();
6767
assertEquals(v, ret);
6868
}
6969

src/test/java/org/msgpack/TestSetPredefinedTypes.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ public void testLong() throws Exception {
7474
testLong(1);
7575
testLong(Long.MIN_VALUE);
7676
testLong(Long.MAX_VALUE);
77-
testLong(Long.MIN_VALUE);
78-
testLong(Long.MAX_VALUE);
7977
Random rand = new Random();
8078
for (int i = 0; i < 1000; i++) {
8179
testLong(rand.nextLong());

0 commit comments

Comments
 (0)