mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8196830: publicLookup().findVirtual should not return method handle to AccessibleObject.setAccessible
Reviewed-by: mchung, psandoz
This commit is contained in:
parent
ced92116db
commit
8f56ea639d
3 changed files with 384 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2018, 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
|
||||
|
@ -643,10 +643,7 @@ class MethodHandleNatives {
|
|||
|
||||
static boolean canBeCalledVirtual(MemberName mem) {
|
||||
assert(mem.isInvocable());
|
||||
Class<?> defc = mem.getDeclaringClass();
|
||||
switch (mem.getName()) {
|
||||
case "checkMemberAccess":
|
||||
return canBeCalledVirtual(mem, java.lang.SecurityManager.class);
|
||||
case "getContextClassLoader":
|
||||
return canBeCalledVirtual(mem, java.lang.Thread.class);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue