Skip to content
Permalink
Browse files
8261198: [macOS] Incorrect JNI parameters in number conversion in A11…
…Y code

Reviewed-by: serb, psadhukhan
  • Loading branch information
Phil Race committed Feb 5, 2021
1 parent 4a1814c commit 4a89733e700c3e55bb50997984b9f89a81f0af8f
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.m
@@ -968,14 +968,14 @@ - (BOOL)accessibilityIsIndexAttributeSettable
}
DECLARE_CLASS_RETURN(jnumber_Class, "java/lang/Number", nil);
DECLARE_CLASS_RETURN(jinteger_Class, "java/lang/Integer", nil);
DECLARE_METHOD_RETURN(jm_intValue, jnumber_Class, "intValue", "()D", nil);
DECLARE_METHOD_RETURN(jm_intValue, jnumber_Class, "intValue", "()I", nil);
DECLARE_METHOD_RETURN(jm_doubleValue, jnumber_Class, "doubleValue", "()D", nil);
if ((*env)->IsInstanceOf(env, jnumber, jinteger_Class)) {
jint i = (*env)->CallIntMethod(env, jnumber_Class, jm_intValue);
jint i = (*env)->CallIntMethod(env, jnumber, jm_intValue);
CHECK_EXCEPTION();
return [NSNumber numberWithInteger:i];
} else {
jdouble d = (*env)->CallDoubleMethod(env, jnumber_Class, jm_doubleValue);
jdouble d = (*env)->CallDoubleMethod(env, jnumber, jm_doubleValue);
CHECK_EXCEPTION();
return [NSNumber numberWithDouble:d];
}

3 comments on commit 4a89733

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot replied Feb 5, 2021

@VladimirKempik

This comment has been minimized.

Copy link

@VladimirKempik VladimirKempik replied Apr 15, 2021

/backport jdk15u-dev

@openjdk

This comment has been minimized.

Copy link

@openjdk openjdk bot replied Apr 15, 2021

@VladimirKempik could not automatically backport 4a89733e to openjdk/jdk15u-dev due to conflicts in the following files:

  • src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.m

To manually resolve these conflicts run the following commands in your personal fork of openjdk/jdk15u-dev:

$ git checkout -b backport-4a89733e
$ git fetch --no-tags https://git.openjdk.java.net/jdk 4a89733e700c3e55bb50997984b9f89a81f0af8f
$ git cherry-pick --no-commit 4a89733e700c3e55bb50997984b9f89a81f0af8f
$ # Resolve conflicts
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport 4a89733e700c3e55bb50997984b9f89a81f0af8f'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk15u-dev with the title Backport 4a89733e700c3e55bb50997984b9f89a81f0af8f.

Please sign in to comment.