Skip to content
Permalink
Browse files
8259585: [macos] Bad JNI lookup error : Accessible actions do not wor…
…k on macOS

Backport-of: b6d51e15549e11be583625d908192d9f7f049489
  • Loading branch information
Olga Mikhaltsova authored and Yuri Nesterenko committed Apr 16, 2021
1 parent 847c0e3 commit 14e56d14be2a99c77f0fc47b59e341ae7be11a65
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/java.desktop/macosx/native/libawt_lwawt/awt/JavaAccessibilityAction.m
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -62,7 +62,8 @@ - (NSString *)getDescription
{
JNIEnv* env = [ThreadUtilities getJNIEnv];
DECLARE_CLASS_RETURN(sjc_CAccessibility, "sun/lwawt/macosx/CAccessibility", nil);
DECLARE_METHOD_RETURN(jm_getAccessibleActionDescription, sjc_CAccessibility, "getAccessibleActionDescription",
DECLARE_STATIC_METHOD_RETURN(jm_getAccessibleActionDescription, sjc_CAccessibility,
"getAccessibleActionDescription",
"(Ljavax/accessibility/AccessibleAction;ILjava/awt/Component;)Ljava/lang/String;", nil);

/* WeakGlobalRefs can be cleared at any time, so first get strong local refs and use those */
@@ -95,7 +96,7 @@ - (void)perform
{
JNIEnv* env = [ThreadUtilities getJNIEnv];
DECLARE_CLASS(sjc_CAccessibility, "sun/lwawt/macosx/CAccessibility");
DECLARE_METHOD(jm_doAccessibleAction, sjc_CAccessibility, "doAccessibleAction",
DECLARE_STATIC_METHOD(jm_doAccessibleAction, sjc_CAccessibility, "doAccessibleAction",
"(Ljavax/accessibility/AccessibleAction;ILjava/awt/Component;)V");

(*env)->CallStaticVoidMethod(env, sjc_CAccessibility, jm_doAccessibleAction,

1 comment on commit 14e56d1

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 14e56d1 Apr 16, 2021

Please sign in to comment.