RFR: 8287908: Use non-cloning reflection methods where acceptable [v2]
Roger Riggs
rriggs at openjdk.java.net
Tue Jun 14 18:58:03 UTC 2022
On Wed, 8 Jun 2022 10:58:30 GMT, Сергей Цыпанов <duke at openjdk.java.net> wrote:
>> Instead of `Executable.getParameterTypes()` we could use `Executable.getSharedParameterTypes()` in trusted code. Same is applicable for `Executable.getExceptionTypes()`.
>
> Сергей Цыпанов has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
>
> - Merge branch 'master' into 8287908
> - 8287908: Use non-cloning reflection methods where acceptable
src/java.base/share/classes/java/lang/reflect/Executable.java line 318:
> 316: final boolean realParamData = hasRealParameterData();
> 317: final Type[] genericParamTypes = getGenericParameterTypes();
> 318: final Type[] nonGenericParamTypes = getSharedParameterTypes();
This is not a safe replacement; it may be returned to the caller at line 345.
-------------
PR: https://git.openjdk.org/jdk/pull/9064
More information about the core-libs-dev
mailing list