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

Backport-of: 4a89733e700c3e55bb50997984b9f89a81f0af8f
  • Loading branch information
Olga Mikhaltsova authored and Yuri Nesterenko committed Apr 16, 2021
1 parent 14e56d1 commit 5e8975599bd22e6ee4db3c889ea046e8b489bdb6
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.m
@@ -964,14 +964,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);
return [NSNumber numberWithInteger:i];
} else {
jdouble d = (*env)->CallDoubleMethod(env, jnumber_Class, jm_doubleValue);
jdouble d = (*env)->CallDoubleMethod(env, jnumber, jm_doubleValue);
return [NSNumber numberWithDouble:d];

1 comment on commit 5e89755


This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 5e89755 Apr 16, 2021

Please sign in to comment.