Context:
The current implementation of JsonObject#equals fails to equate numeric types correctly, leading to false comparisons:
2f is not considered equal to 2.
2D is not considered equal to 2.
Changes:
This PR updates JsonObject#equals to correctly handle comparisons between different numeric types (float, double, intege, long), ensuring logical equivalence where expected. Additionally, new assertions have been added to JsonObjectTest#testNumberEquality to validate these changes.
This PR tries to fix exactly the same by modifying the JsonObject#equals. Adds new assertions to JsonObjectTest#testNumberEquality.
Motivation: The motivation is to fix the bug: https://github.com/eclipse-vertx/vert.x/issues/5185
Context: The current implementation of JsonObject#equals fails to equate numeric types correctly, leading to false comparisons:
2f is not considered equal to 2. 2D is not considered equal to 2. Changes: This PR updates JsonObject#equals to correctly handle comparisons between different numeric types (float, double, intege, long), ensuring logical equivalence where expected. Additionally, new assertions have been added to JsonObjectTest#testNumberEquality to validate these changes.
This PR tries to fix exactly the same by modifying the JsonObject#equals. Adds new assertions to JsonObjectTest#testNumberEquality.