mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-23 05:10:57 +00:00
use right shift
This commit is contained in:
parent
515ffa092b
commit
8a30d2ec75
@ -315,7 +315,7 @@ public final class Long extends Number
|
||||
*/
|
||||
public static String toHexString(long i) {
|
||||
int mag = Long.SIZE - Long.numberOfLeadingZeros(i);
|
||||
int len = Math.max(((mag + 3) / 4), 1);
|
||||
int len = Math.max(((mag + 3) >> 2), 1);
|
||||
long x = HexDigits.hex8(i);
|
||||
if (COMPACT_STRINGS) {
|
||||
byte[] chars = new byte[len];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user