RFR: JDK-8258381 : [macos] Exception when input emoji using Chinese input method

Jose Pereda jpereda at openjdk.java.net
Thu Apr 1 20:17:07 UTC 2021


On Thu, 25 Mar 2021 03:17:37 GMT, Hsiafan <github.com+1498664+hsiafan at openjdk.org> wrote:

>> I'll review this. The fix seems fine at first glance. With your patch it uses a similar mechanism to the attributed string case; I'm curious why copying the string is needed in that case, but not in this case.
>> 
>> What testing have you done to ensure that this will not cause any regressions?
>> 
>> Perhaps @prrace or @jperedadnr or @johanvos could be a second reviewer?
>
> I've test on macOS 11.2.3 with Chinese input method, including ascii chars, CJK chars, emojis, and inputing ascii/cjk chars+emojis together. All works as expected.
> 
> The memory allocation in NSAttributedString could be eliminated either, AFAIK. I haven't tested it, do not know how  to input a NSAttributedString.

As mentioned earlier, the fix works fine for me on macOS 10.15.6.

About the case of `NSAttributedString`, yes it could be refactored too. However, I couldn't test it either, as I'm not sure how we could get "rich text" typed into a JavaFX input control. In any case, maybe it is better to do it in a follow-up issue?

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

PR: https://git.openjdk.java.net/jfx/pull/436


More information about the openjfx-dev mailing list