Skip to content

Commit

Permalink
Warnings clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Dec 11, 2023
1 parent 43db9af commit 755a907
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private static JsonNode mapFromComplianceNode(ObjectNode expected) {
// for some reason, the compliance tests escape these values. this makes some tests fail right now
return nodeF.textNode(value.textValue());
case "integer":
return nodeF.numberNode(NumberInput.parseBigInteger(value.textValue()));
return nodeF.numberNode(NumberInput.parseBigInteger(value.textValue(), false));
case "float":
switch (value.textValue()) {
case "inf":
Expand All @@ -96,7 +96,7 @@ private static JsonNode mapFromComplianceNode(ObjectNode expected) {
case "nan":
return nodeF.numberNode(Double.NaN);
default:
return nodeF.numberNode(NumberInput.parseBigDecimal(value.textValue()));
return nodeF.numberNode(NumberInput.parseBigDecimal(value.textValue(), false));
}
case "boolean":
return nodeF.booleanNode(Boolean.parseBoolean(value.textValue()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ public void stringEscapes() throws IOException {
toml.append("\"");

// 03-Dec-2022, tatu: This is unfortunate, have to use direct access
ObjectNode node = Parser.parse(testIOContext(),
TomlWriteFeature.INTERNAL_PROHIBIT_INTERNAL_BUFFER_ALLOCATE, new StringReader(toml.toString()));
ObjectNode node = Parser.parse(FACTORY, testIOContext(),
new StringReader(toml.toString()));

Assert.assertEquals(SCALE, node.get("foo").textValue().length());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ public void bigInteger() throws JsonProcessingException {
);
}

@SuppressWarnings("BigDecimalMethodWithoutRoundingCalled")
@Test
public void bigDecimal() throws JsonProcessingException {
BigDecimal testValue = BigDecimal.valueOf(Double.MIN_VALUE).divide(BigDecimal.valueOf(2));
Expand Down

0 comments on commit 755a907

Please sign in to comment.