Merge remote-tracking branch 'upstream/master' into optim_to_hex_202501

This commit is contained in:
Shaojin Wen 2025-05-26 06:19:11 +08:00
commit ff03a8eeb6
4 changed files with 12 additions and 11 deletions

View File

@ -101,7 +101,8 @@ public final class Integer extends Number
/**
* All possible chars for representing a number as a String
*/
static final char[] digits = {
@Stable
static final byte[] digits = {
'0' , '1' , '2' , '3' , '4' , '5' ,
'6' , '7' , '8' , '9' , 'a' , 'b' ,
'c' , 'd' , 'e' , 'f' , 'g' , 'h' ,
@ -173,10 +174,10 @@ public final class Integer extends Number
}
while (i <= -radix) {
buf[charPos--] = (byte)digits[-(i % radix)];
buf[charPos--] = digits[-(i % radix)];
i = i / radix;
}
buf[charPos] = (byte)digits[-i];
buf[charPos] = digits[-i];
if (negative) {
buf[--charPos] = '-';
@ -410,7 +411,7 @@ public final class Integer extends Number
int radix = 1 << shift;
int mask = radix - 1;
do {
buf[--charPos] = (byte)Integer.digits[val & mask];
buf[--charPos] = Integer.digits[val & mask];
val >>>= shift;
} while (charPos > 0);
}

View File

@ -160,10 +160,10 @@ public final class Long extends Number
}
while (i <= -radix) {
buf[charPos--] = (byte)Integer.digits[(int)(-(i % radix))];
buf[charPos--] = Integer.digits[(int)(-(i % radix))];
i = i / radix;
}
buf[charPos] = (byte)Integer.digits[(int)(-i)];
buf[charPos] = Integer.digits[(int)(-i)];
if (negative) {
buf[--charPos] = '-';
@ -456,7 +456,7 @@ public final class Long extends Number
int radix = 1 << shift;
int mask = radix - 1;
do {
buf[--charPos] = (byte)Integer.digits[((int) val) & mask];
buf[--charPos] = Integer.digits[((int) val) & mask];
val >>>= shift;
} while (charPos > offset);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -3589,7 +3589,7 @@ public interface DatabaseMetaData extends Wrapper {
* DECIMAL_DIGITS is not applicable.
* <LI><B>NUM_PREC_RADIX</B> int {@code =>} Radix (typically either 10 or 2)
* <LI><B>COLUMN_USAGE</B> String {@code =>} The allowed usage for the column. The
* value returned will correspond to the enum name returned by {@link PseudoColumnUsage#name PseudoColumnUsage.name()}
* value returned will correspond to the enum name returned by {@link PseudoColumnUsage#name() PseudoColumnUsage.name()}
* <LI><B>REMARKS</B> String {@code =>} comment describing column (may be {@code null})
* <LI><B>CHAR_OCTET_LENGTH</B> int {@code =>} for char types the
* maximum number of bytes in the column

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -59,7 +59,7 @@ import jdk.internal.reflect.Reflection;
* </ul>
*
* <li>Service providers of the {@code java.sql.Driver} class, that are loaded
* via the {@linkplain ServiceLoader#load service-provider loading} mechanism.
* via the {@linkplain ServiceLoader#load(Class) service-provider loading} mechanism.
*</ul>
*
* @implNote