<i18n dev> RFR: 8316150: Refactor get chars and string size [v3]

Chen Liang liach at openjdk.org
Wed Sep 13 05:12:46 UTC 2023


On Wed, 13 Sep 2023 02:17:00 GMT, 温绍锦 <duke at openjdk.org> wrote:

>> 1. Reduce duplicate stringSize code
>> 2. Move java.lang.StringLatin1.getChars to jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other packages also need to use this method
>
> 温绍锦 has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fix build error

Changes requested by liach (Author).

src/java.base/share/classes/jdk/internal/util/DecimalDigits.java line 216:

> 214:      */
> 215:     public static int getCharsLatin1(int i, int index, byte[] buf) {
> 216:         // Used by trusted callers.  Assumes all necessary bounds checks have been done by the caller.

Can you move this into the javadoc, like

<strong>Caller must ensure buf has enough capacity for the value to be written!</strong>

-------------

PR Review: https://git.openjdk.org/jdk/pull/15699#pullrequestreview-1623691652
PR Review Comment: https://git.openjdk.org/jdk/pull/15699#discussion_r1323970440


More information about the i18n-dev mailing list