Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
The test failed if the value matched exactly -Integer.MIN_VALUE, in which case Jackson was casting it from long to int, but the test code was not doing the same.
  • Loading branch information
craigtaverner committed Dec 1, 2023
1 parent 70497dc commit 004e490
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ protected Function<Object, Object> loadBlockExpected() {

protected static Object asJacksonNumberOutput(long l) {
// Cast to int to mimic jackson-core behaviour in NumberOutput.outputLong()
if (l < 0 && l > Integer.MIN_VALUE || l >= 0 && l <= Integer.MAX_VALUE) {
if (l < 0 && l >= Integer.MIN_VALUE || l >= 0 && l <= Integer.MAX_VALUE) {
return (int) l;
} else {
return l;
Expand Down

0 comments on commit 004e490

Please sign in to comment.