Skip to content

Commit 32ea7e0

Browse files
committed
tests should succeed
1 parent e9ea5ca commit 32ea7e0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

JSONObjectTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ public void jsonObjectIncrement() {
765765
// 3. A float+float operation will be performed and results into a float primitive.
766766
// 4. There is no method that matches the signature put( String key, float value), java-compiler will choose the method
767767
// put( String key, double value) and does an implicit type-cast(!) by appending zero-bits to the mantissa
768-
assertTrue( "JSONObject increment unexpected behavior, Float will not stay Float!", jo.get( "bug" ) instanceof Float );
768+
assertTrue( "JSONObject increment converts Float to Double", jo.get( "bug" ) instanceof Double );
769769
// correct implementation (with change of behavior) would be:
770770
// this.put(key, new Float((Float) value + 1));
771771
// Probably it would be better to deprecate the method and remove some day, while convenient processing the "payload" is not

0 commit comments

Comments
 (0)