Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.
/ jdk15u-dev Public archive

Commit

Permalink
8259585: [macos] Bad JNI lookup error : Accessible actions do not wor…
Browse files Browse the repository at this point in the history
…k on macOS

Backport-of: b6d51e15549e11be583625d908192d9f7f049489
  • Loading branch information
Olga Mikhaltsova authored and Yuri Nesterenko committed Apr 16, 2021
1 parent 847c0e3 commit 14e56d1
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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,
Expand Down

1 comment on commit 14e56d1

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.