andreachild commented on code in PR #3117:
URL: https://github.com/apache/tinkerpop/pull/3117#discussion_r2080032439
##########
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/NumberHelper.java:
##########
@@ -361,8 +377,18 @@ public static Class<? extends Number>
getHighestCommonNumberClass(final boolean
*/
public static Number add(final Number a, final Number b) {
if (null == a || null == b) return a;
- final Class<? extends Number> clazz = getHighestCommonNumberClass(a,
b);
- return getHelper(clazz).add.apply(a, b);
+ NumberInfo numberInfo = getHighestCommonNumberInfo(false, a, b);
+ while (true) {
+ try {
+ final Class<? extends Number> clazz =
determineNumberClass(numberInfo.bits, numberInfo.fp);
Review Comment:
Javadoc for this method should be updated to describe type promotion on
overflow
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]