On Tue, 3 Sep 2024 12:42:08 GMT, Claes Redestad <redes...@openjdk.org> wrote:

>> Shaojin Wen has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Update src/java.base/share/classes/java/lang/System.java
>>   
>>   Co-authored-by: Claes Redestad <claes.redes...@oracle.com>
>
> src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java line 397:
> 
>> 395: 
>> 396:     /**
>> 397:      * if string#coder() is Latin1 return the count of string#value() 
>> leading greater than zero, else return 0
> 
> Can you move this next to `countPositives`? 
> 
> Suggestion:
> 
>      * Count the number of leading positive, non-zero bytes in the range.
> 
> 
> Technically this new routine is the "real" `countPositives` since, 
> mathematically speaking, zero is neither positive nor negative. It's named 
> like it is because I'm no mathematician, and now it might be better to rename 
> away from that to disambiguate.. If you feel like it then please file an RFE 
> to have `countPositives` renamed to `countNonNegatives`

We might rename these to `countAscii` and `countModifiedUtf8Compatible`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20772#discussion_r1742093845

Reply via email to