File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed
core/src/test/scala/org/apache/spark/util
network/common/src/main/java/org/apache/spark/network/util Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -174,17 +174,10 @@ class UtilsSuite extends FunSuite with ResetSystemProperties {
174174 intercept[NumberFormatException ] {
175175 Utils .byteStringAsBytes(" 600gb This breaks" )
176176 }
177-
177+
178178 intercept[NumberFormatException ] {
179179 Utils .byteStringAsBytes(" This 123mb breaks" )
180180 }
181-
182- // // Test overflow
183- // intercept[NumberFormatException] {
184- //
185- //
186- // ByteUnit.convertTo(0x7fffffffffffffffL, ByteUnit.KiB)
187- // }
188181 }
189182
190183 test(" bytesToString" ) {
Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ public long convertTo(long d, ByteUnit u) {
3939 if (multiplier > u .multiplier ) {
4040 long ratio = multiplier / u .multiplier ;
4141 if (Long .MAX_VALUE / ratio < d ) {
42- throw new IllegalArgumentException ("Conversion of" + d + "exceeds Long.MAX_VALUE in "
43- + name () + ". Try a larger suffix (e.g. MiB instead of KiB)" );
42+ throw new IllegalArgumentException ("Conversion of " + d + " exceeds Long.MAX_VALUE in "
43+ + name () + ". Try a larger unit (e.g. MiB instead of KiB)" );
4444 }
4545 return d * ratio ;
4646 } else {
You can’t perform that action at this time.
0 commit comments