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
8a30d2ec75
commit
9335e85ce1
@ -289,7 +289,7 @@ public final class Integer extends Number
|
||||
*/
|
||||
public static String toHexString(int i) {
|
||||
int mag = Integer.SIZE - Integer.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