mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8210496: Improve filtering for classes with security sensitive fields
Reviewed-by: plevart, mchung
This commit is contained in:
parent
a17816f881
commit
9c70e26c14
8 changed files with 138 additions and 66 deletions
|
@ -54,6 +54,7 @@ import java.util.BitSet;
|
|||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
@ -643,6 +644,10 @@ public class MethodHandles {
|
|||
/** The allowed sorts of members which may be looked up (PUBLIC, etc.). */
|
||||
private final int allowedModes;
|
||||
|
||||
static {
|
||||
Reflection.registerFieldsToFilter(Lookup.class, Set.of("lookupClass", "allowedModes"));
|
||||
}
|
||||
|
||||
/** A single-bit mask representing {@code public} access,
|
||||
* which may contribute to the result of {@link #lookupModes lookupModes}.
|
||||
* The value, {@code 0x01}, happens to be the same as the value of the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue