Hi Alexandr, Thank you for your review comment. I have changed the if condition to chars.trim().isEmpty(). Please review the modified code:
http://cr.openjdk.java.net/~mhalder/7156316/webrev.01/ <http://cr.openjdk.java.net/~mhalder/7156316/webrev.01/> Thanks, Manajit > On 30-Jun-2016, at 10:33 pm, Alexander Scherbatiy > <alexandr.scherba...@oracle.com> wrote: > > On 27/06/16 21:57, Manajit Halder wrote: >> Hi All, >> >> Kindly review the fix for JDK9. >> >> Bug: >> >> <https://bugs.openjdk.java.net/browse/JDK-7156316>https://bugs.openjdk.java.net/browse/JDK-7156316 >> <https://bugs.openjdk.java.net/browse/JDK-7156316> >> >> Webrev: >> >> <http://cr.openjdk.java.net/%7Emhalder/7156316/webrev.00/>http://cr.openjdk.java.net/~mhalder/7156316/webrev.00/ >> <http://cr.openjdk.java.net/~mhalder/7156316/webrev.00/> >> >> Issue: >> [macosx] Ctrl+Space does generate Unknown keychar >> >> Cause: >> SPACK key value was received as “ “ in function handleKeyEvent and that was >> correct value, but while sending the value as a character to function >> nsToJavaChar it was getting passed as 0. The function nsToJavaChar was >> returning 0 as unichar character for SPACE key as there was no code to >> handle the situation. >> >> Fix: >> An extra parameter was added in handleKeyEvent function indicating SPACE key >> and was passed to nsToJavaChar method to handle it. > 156 if ("".equals(chars.trim())) { > It is better to use: chars.trim().isEmpty() or may be spaceKeyTyped = > chars.trim().isEmpty(). > > Thanks, > Alexandr. > >> >> Regards, >> Manajit >