JDK-7006052 : awt_InputMethod.c cleanup is needed
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt:i18n
  • Affected Version: 7
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: generic
  • Submitted: 2010-12-10
  • Updated: 2013-06-13
  • Resolved: 2013-05-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8 b94Fixed
Description
src/solaris/native/sun/awt/awt_InputMethod.c file is full of "ifdef XAWT" preprocessor instructions. As we don't support MAWT anymore since jdk7 so can we safely get rid of them. I hope we don't have dependencies on Motif somewhere.
It would be a pure cleanup but it also would simplify the code clarity. 
In particular following usages may be revised:
1) #ifdef XAWT_HACK

2) JNIEXPORT jboolean JNICALL
#ifdef XAWT
Java_sun_awt_X11_XInputMethod_openXIMNative(JNIEnv *env,
                                          jobject this,
                                          jlong display)
#else
Java_sun_awt_motif_MInputMethod_openXIMNative(JNIEnv *env,
                                          jobject this)
#endif