File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments