Skip to content

Commit 6336c01

Browse files
committed
Simplify casting
1 parent 1a7a50a commit 6336c01

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

components/json/src/test/java/datadog/json/JsonMapperTest.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@ void testMappingToJsonObject(Map<String, Object> input, String expected) throws
3939
assertEquals(entry.getValue().toString(), parsed.get(entry.getKey()));
4040
} else if (entry.getValue() instanceof Float) {
4141
assertTrue(parsed.get(entry.getKey()) instanceof Double);
42-
assertEquals(
43-
(double) (float) (Float) entry.getValue(),
44-
(Double) parsed.get(entry.getKey()),
45-
0.001);
42+
assertEquals((Float) entry.getValue(), (Double) parsed.get(entry.getKey()), 0.001);
4643
} else {
4744
assertEquals(entry.getValue(), parsed.get(entry.getKey()));
4845
}

0 commit comments

Comments
 (0)