On Wed, 20 May 2020 11:47:29 GMT, Jose Pereda <jper...@openjdk.org> wrote:
> Trying to paste on a JavaFX app statically built on Mac OS throws: > > Exception in thread "JavaFX Application Thread" java.lang.ClassCastException > at at > com.sun.glass.ui.mac.MacPasteboard._getUTFs(MacPasteboard.java) > > > Checking the native method signature a `String[][]` type is expected. However > the native method implementation uses: > jobjectArray utfs = (*env)->NewObjectArray(env, size, (*env)->FindClass(env, > "java/lang/Object"), NULL); > for (items) { > jobjectArray array = (*env)->NewObjectArray(env, size, > (*env)->FindClass(env, "java/lang/String"), NULL); > } > > This PR fixes the issue by applying the correct array type signature > according to [JNI > specs](https://docs.oracle.com/en/java/javase/11/docs/specs/jni/functions.html#findclass). > It has been tested on Mac OS, both with and without static build. This pull request has now been integrated. Changeset: 37b5edc7 Author: Jose Pereda <jper...@openjdk.org> Committer: Kevin Rushforth <k...@openjdk.org> URL: https://git.openjdk.java.net/jfx/commit/37b5edc7 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8245456: MacPasteboard throws ClassCastException on static builds Reviewed-by: kcr ------------- PR: https://git.openjdk.java.net/jfx/pull/228