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

Backport-of: 4a89733
  • Loading branch information
Olga Mikhaltsova authored and Yuri Nesterenko committed Apr 16, 2021
1 parent 8a7c9d7 commit 862af192afcbe8ded16b42a1dcec3c44594c09be
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);
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];
}

1 comment on commit 862af19

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 862af19 Apr 16, 2021

Please sign in to comment.