Skip to content

Commit

Permalink
Update release notes wrt #124
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Dec 4, 2017
1 parent 3f29c6c commit 372fb4b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -701,8 +701,7 @@ public JsonToken nextToken() throws IOException
_numberLong = -l - 1L;
_numTypesValid = NR_LONG;
} else {
BigInteger unsignedBase = _bigPositive(l);
_numberBigInt = unsignedBase.negate().subtract(BigInteger.ONE);
_numberBigInt = _bigNegative(l);
_numTypesValid = NR_BIGINT;
}
}
Expand Down Expand Up @@ -1176,8 +1175,7 @@ public String nextTextValue() throws IOException
_numberLong = l;
_numTypesValid = NR_LONG;
} else {
BigInteger unsignedBase = _bigPositive(l);
_numberBigInt = unsignedBase.negate().subtract(BigInteger.ONE);
_numberBigInt = _bigNegative(l);
_numTypesValid = NR_BIGINT;
}
}
Expand Down Expand Up @@ -3145,6 +3143,8 @@ private final BigInteger _bigPositive(long l) {
}

private final BigInteger _bigNegative(long l) {
return BigInteger.valueOf(l).subtract(BigInteger.ONE);
// 03-Dec-2017, tatu: [dataformats-binary#149] Careful with overflow
BigInteger unsignedBase = _bigPositive(l);
return unsignedBase.negate().subtract(BigInteger.ONE);
}
}
4 changes: 4 additions & 0 deletions release-notes/CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,7 @@ philipa@github
* Reported #114 (cbor), contributed fix for: copyStructure(): avoid duplicate tags
when copying tagged binary
(2.9.3)

Jacek Lach (JacekLach@github)
* Reported #124: Invalid value returned for negative int32 where the absolute value is > 2^31 - 1
(2.9.3)
2 changes: 2 additions & 0 deletions release-notes/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Modules:
(contributed by philipa@github)
#116: (protobuf) Should skip the positive byte which is the last byte of an varint
(contributed by marsqing@github)
#124: Invalid value returned for negative int32 where the absolute value is > 2^31 - 1
(repoted by Jacek L)
- (protobuf) Minor fix to skipping with `nextFieldName()`
- (avro) Fix a typo in SPI Metadata (META-INF/services/com.fasterxml.jackson.core.JsonFactory)

Expand Down

0 comments on commit 372fb4b

Please sign in to comment.