Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Commit 8de0239

Browse files
Olga MikhaltsovaYuri Nesterenko
authored andcommitted
8259585: [macos] Bad JNI lookup error : Accessible actions do not work on macOS
Backport-of: b6d51e1
1 parent 2b18941 commit 8de0239

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/java.desktop/macosx/native/libawt_lwawt/awt/JavaAccessibilityAction.m

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -62,7 +62,8 @@ - (NSString *)getDescription
6262
{
6363
JNIEnv* env = [ThreadUtilities getJNIEnv];
6464
DECLARE_CLASS_RETURN(sjc_CAccessibility, "sun/lwawt/macosx/CAccessibility", nil);
65-
DECLARE_METHOD_RETURN(jm_getAccessibleActionDescription, sjc_CAccessibility, "getAccessibleActionDescription",
65+
DECLARE_STATIC_METHOD_RETURN(jm_getAccessibleActionDescription, sjc_CAccessibility,
66+
"getAccessibleActionDescription",
6667
"(Ljavax/accessibility/AccessibleAction;ILjava/awt/Component;)Ljava/lang/String;", nil);
6768

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

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

0 commit comments

Comments
 (0)