On Wed, 28 Apr 2021 17:53:44 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:

>> Maurizio Cimadamore has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Address first batch of review comments
>
> src/java.base/share/classes/jdk/internal/module/IllegalNativeAccessChecker.java
>  line 40:
> 
>> 38: 
>> 39:     private IllegalNativeAccessChecker(Set<String> allowedModuleNames, 
>> boolean allowAllUnnamedModules) {
>> 40:         this.allowedModuleNames = 
>> Collections.unmodifiableSet(allowedModuleNames);
> 
> Should that be Set.copyOf() to take advantage of the immutability of `SetN` 
> (but at the expense of additional copying)...

Honestly, I'm not even sure why we should be concerned about mutation of the 
set here - since we create this with a bunch of values read from a system 
property... e.g. should we just store `allowedModuleNames` period?

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

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

Reply via email to