RFR: 8301065: Handle control characters in java_lang_String::print [v2]

David Holmes dholmes at openjdk.org
Tue Apr 18 07:45:46 UTC 2023


On Mon, 17 Apr 2023 16:53:41 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> We actually have some intentional use of non printable characters. For example, for string concatenation like this:
> 
> ```
> String x = ....;
> String s = "abc" + x + "xyz";
> ```
> 
> We'll pass a parameter to the `StringConcatFactory.makeConcatWithConstants()` bootstrap method that looks like this:
> 
> ```
> "abc\u0001xyz"
> ```

That doesn't seem a valid thing to do as string literals could contain any character, including \u0001. ??

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

PR Comment: https://git.openjdk.org/jdk/pull/12190#issuecomment-1512607642


More information about the hotspot-runtime-dev mailing list