RFR: 8358066: Non-ascii package names gives compilation error "import requires canonical name" [v2]

Naoto Sato naoto at openjdk.org
Tue Jun 3 21:54:26 UTC 2025


On Tue, 3 Jun 2025 21:34:43 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:

> > Just a drive-by comment, but should we check the validity of `off`? What if `off` points to the 2nd or 3rd byte in a character in the buffer?
> 
> Good question. This method is explicitly documented as assuming that the data is valid UTF-8. It's not trying to handle invalid data.

I meant the validity of `off`, not the UTF-8 data. For example in your test case, if the `off` is 16, it will return 3 chars although the first one is only the trailing byte. So I guess some comment may help here

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

PR Comment: https://git.openjdk.org/jdk/pull/25567#issuecomment-2937319888


More information about the compiler-dev mailing list