RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v7]

Jorn Vernee jvernee at openjdk.java.net
Thu Oct 22 14:39:18 UTC 2020


On Tue, 20 Oct 2020 21:53:55 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/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/FunctionDescriptor.java line 60:
> 
>> 58:     private FunctionDescriptor(MemoryLayout resLayout, Map<String, Constable> attributes, MemoryLayout... argLayouts) {
>> 59:         this.resLayout = resLayout;
>> 60:         this.attributes = Collections.unmodifiableMap(attributes);
> 
> Since `attributes` is never exposed directly or indirectly via a set of keys/values/entries there is no need to wrap it.

True. Though, it might be nice to keep like this as a bit of sanity checking. The map _should not_ be modified after construction.

-------------

PR: https://git.openjdk.java.net/jdk/pull/634



More information about the security-dev mailing list