On 9/6/2016 1:14 PM, Alan Burlison wrote:
On 06/09/2016 20:29, Phil Race wrote:

You are removing this : native method

Java_sun_awt_X11_XlibWrapper_XKeycodeToKeysym There is no explanation
about this .. and unless you discovered this method is obsolete (never
called) it seems like it should also be updated .. not deleted. And
since I see it called from XToolkit.java it appears updating is what is
needed. You would then also need to revert the mapfile change.

Hmm, yes - good point... If Java_sun_awt_X11_XlibWrapper_XKeycodeToKeysym is only ever used within the AWT code then it could be replaced by calling Java_sun_awt_X11_XlibWrapper_XkbKeycodeToKeysym (which already exists).

These are all internal-only entry points
So if that exists (I did not know that it did) then I think you have a few options but the most forward looking is to get rid of all references to the deprecated methods and migrate all uses (inc. Java land ones) to the new code.

The declaration in XlibWrapper.java would need to be deleted.
And BTW if that is done then javac will helpfully find all the places that you need to fix .. assuming no use of reflection.

-phil.

However if it is ever used outside then it's more of a problem. I wasn't sure if XlibWrapper.c was internal-only or not. If it isn't then I think the only option is to leave the Java_sun_awt_X11_XlibWrapper_XKeycodeToKeysym function in place and just change the implementation to use XkbKeycodeToKeysym underneath. If so, should Java_sun_awt_X11_XlibWrapper_XKeycodeToKeysym be flagged as deprecated?

In either case, I believe the existing Java calls to Java_sun_awt_X11_XlibWrapper_XKeycodeToKeysym need to be switched over to Java_sun_awt_X11_XlibWrapper_XkbKeycodeToKeysym. I thought I'd found those, clearly not.

Thanks for the catch,


Reply via email to