RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v7]
Jorn Vernee
jvernee at openjdk.java.net
Thu Oct 22 14:34:19 UTC 2020
On Tue, 20 Oct 2020 21:08:26 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
>> Maurizio Cimadamore has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 25 commits:
>>
>> - Merge branch 'master' into 8254231_linker
>> - Fix incorrect capitalization in one copyright header
>> - Update copyright years, and add classpath exception to files that were missing it
>> - Use separate constants for native invoker code size
>> - Re-add file erroneously deleted (detected as rename)
>> - Re-add erroneously removed files
>> - Merge branch 'master' into 8254231_linker
>>
>> - Fix tests
>> - Fix more whitespaces
>> - Fix whitespaces
>> - Remove rejected file
>> - ... and 15 more: https://git.openjdk.java.net/jdk/compare/cb6167b2...502bd980
>
> src/java.base/share/classes/java/lang/invoke/NativeMethodHandle.java line 36:
>
>> 34: import static java.lang.invoke.MethodHandleStatics.newInternalError;
>> 35:
>> 36: /** TODO */
>
> Is the TODO to make this class public later and adjust the return type of `downcallHandle`?
IIRC this was added to silence a javac linter warning. Something should be added here. There is/was no plan to make this class public though.
> src/java.base/share/classes/java/lang/invoke/NativeMethodHandle.java line 145:
>
>> 143: */
>> 144: private static class Lazy {
>> 145: static Class<NativeMethodHandle> THIS_CLASS = NativeMethodHandle.class;
>
> final field? Is this field needed, as `NativeMethodHandle.class` could be used directly, or use a local variable instead in the static code block.
Yes, this was a leftover from old code. Can be a local var now, or remove altogether and replaced with `NativeMethodHandle.class`
-------------
PR: https://git.openjdk.java.net/jdk/pull/634
More information about the security-dev
mailing list