[11] RFR: 4993841: (str) java.lang.Character should have a toString(int) method

Stuart Marks stuart.marks at oracle.com
Sat Mar 3 01:50:40 UTC 2018

Looks good.

I note that other codepoint-consuming methods, such as

     Character.toChars(cp, char[], int)

all throw IAE with no message. It would be nice to add messages to them. It 
would be even nicer to print out the offending value, possibly even in hex. 
Indeed, there are several other places in Character.java where exceptions are 
thrown that lack diagnostic information. Maybe as part of a separate cleanup pass?


On 3/2/18 3:37 PM, naoto.sato at oracle.com wrote:
> Thanks for comments, Martin, Roger. Updated the fix as follows:
> http://cr.openjdk.java.net/~naoto/4993841/webrev.04/
> Naoto
> On 3/1/18 6:47 PM, naoto.sato at oracle.com wrote:
>> Hi,
>> Please review the fix to the following issue:
>> https://bugs.openjdk.java.net/browse/JDK-4993841
>> The proposed changeset is located at:
>> http://cr.openjdk.java.net/~naoto/4993841/webrev.03/
>> This stems from the recent discussion regarding String.repeat().[1] The 
>> corresponding CSR has already been approved.
>> Naoto
>> -- 
>> [1] 
>> http://mail.openjdk.java.net/pipermail/core-libs-dev/2018-February/051568.html

More information about the core-libs-dev mailing list