Skip to content

Commit

Permalink
Fix a thing that conflicted with a recent change
Browse files Browse the repository at this point in the history
  • Loading branch information
gbrail committed Sep 24, 2024
1 parent 7050923 commit 8f7a844
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rhino/src/main/java/org/mozilla/javascript/JavaMembers.java
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,13 @@ private void discoverAccessibleMethods(

if (isPublic(mods) || isProtected(mods) || includePrivate) {
MethodSignature sig = new MethodSignature(method);
if (includePrivate) {
// We don't want to replace the deprecated method here
// because it is not available on Android.
if (includePrivate && !method.isAccessible()) {
map.computeIfAbsent(
sig,
k -> {
method.trySetAccessible();
method.setAccessible(true);
return method;
});
} else {
Expand Down

0 comments on commit 8f7a844

Please sign in to comment.