mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8247444: Trust final fields in records
Co-authored-by: Christoph Dreis <christoph.dreis@freenet.de> Reviewed-by: jrose, dholmes, forax, coleenp, vlivanov
This commit is contained in:
parent
983e012c9f
commit
f2b191a6e9
26 changed files with 227 additions and 49 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2020, 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
|
||||
|
@ -118,6 +118,10 @@ class ReflectAccess implements jdk.internal.access.JavaLangReflectAccess {
|
|||
return (T) obj.getRoot();
|
||||
}
|
||||
|
||||
public boolean isTrustedFinalField(Field f) {
|
||||
return f.isTrustedFinal();
|
||||
}
|
||||
|
||||
public <T> T newInstance(Constructor<T> ctor, Object[] args, Class<?> caller)
|
||||
throws IllegalAccessException, InstantiationException, InvocationTargetException
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue