srowen commented on a change in pull request #23420: [SPARK-26508][Core][SQL] 
Address warning messages in Java reported at lgtm.com
URL: https://github.com/apache/spark/pull/23420#discussion_r244624369
 
 

 ##########
 File path: 
common/network-common/src/main/java/org/apache/spark/network/util/ByteUnit.java
 ##########
 @@ -54,7 +54,7 @@ public double toBytes(long d) {
     if (d < 0) {
       throw new IllegalArgumentException("Negative size value. Size must be 
positive: " + d);
     }
-    return d * multiplier;
+    return d * (double)multiplier;
 
 Review comment:
   Hm, really? what does it return? type-wise the numbers should easily fit 
into a long. 2 TiB = 2199023255552 bytes. I'm missing where the failure is here.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to