RFR: 8201429: Support AIX Input Method Editor (IME) for AWT Input Method Framework (IMF)

Langer, Christoph christoph.langer at sap.com
Fri May 18 11:59:01 UTC 2018


Hi all,

Here is an updated webrev:
http://cr.openjdk.java.net/~clanger/webrevs/8201429.2/ 
Can someone from the graphics/awt team please have a look at that change? Especially checking that we don't break non-AIX platforms? Thanks in advance.

@Ichiroh: Thanks for your review and tests. Adressing your points:

> resetCompositionState() was missing in
> src/java.desktop/aix/classes/sun/awt/X11InputMethod.java
> ==========================================================
> ==
> --- a/src/java.desktop/aix/classes/sun/awt/X11InputMethod.java  Wed May
> 09 09:05:32 2018 +0900
> +++ b/src/java.desktop/aix/classes/sun/awt/X11InputMethod.java  Mon
> May
> 14 21:25:50 2018 +0900
> @@ -56,6 +56,21 @@
>       }
> 
>       /**
> +     * Reset the composition state to the current composition state.
> +     */
> +    protected void resetCompositionState() {
> +        if (compositionEnableSupported && haveActiveClient()) {
> +            try {
> +                /* Restore the composition mode to the last saved
> composition
> +                   mode. */
> +                setCompositionEnabled(savedCompositionState);
> +            } catch (UnsupportedOperationException e) {
> +                compositionEnableSupported = false;
> +            }
> +        }
> +    }
> +
> +    /**
>        * Activate input method.
>        */
>       public synchronized void activate() {
> ==========================================================

Good catch. I've incorporated that in my new webrev.

> Otherwise,
> we could not find out any functional difference on Linux.
> we could not find out any functional difference between our modified code and your code on AIX.
> 
> By code check, we found following difference.
> ==========================================================
> ==
> --- a/src/java.desktop/aix/native/libawt_xawt/awt/awt_InputMethod.c
> Wed May 09 09:05:32 2018 +0900
> +++ b/src/java.desktop/aix/native/libawt_xawt/awt/awt_InputMethod.c
> Mon May 14 21:25:50 2018 +0900
> @@ -248,6 +248,10 @@
>                                "flushText",
>                                "()V");
>           JNU_CHECK_EXCEPTION_RETURN(env, NULL);
> +        if ((*env)->ExceptionOccurred(env)) {
> +            (*env)->ExceptionDescribe(env);
> +            (*env)->ExceptionClear(env);
> +        }
>           /* IMPORTANT:
>              The order of the following calls is critical since
> "imInstance" may
>              point to the global reference itself, if
> "freeX11InputMethodData" is called
> ==========================================================
> 
> Did you remove this code intentionally ?

Yes, I removed that one intentionally. There is no point in doing the Exception check/clearing after a call to JNU_CHECK_EXCEPTION_RETURN(env, NULL); 

> Otherwise, I think the other changes were acceptable.
��

Thanks and Best regards
Christoph



More information about the ppc-aix-port-dev mailing list