RFR: 8340670: Policy.UNSUPPORTED_EMPTY_COLLECTION.isReadOnly does not return true

Artur Barashev duke at openjdk.org
Tue Sep 24 17:08:39 UTC 2024


On Tue, 24 Sep 2024 16:48:26 GMT, Sean Mullan <mullan at openjdk.org> wrote:

>> https://bugs.openjdk.org/browse/JDK-8340670
>
> src/java.base/share/classes/java/security/Policy.java line 907:
> 
>> 905:         @Override
>> 906:         public boolean isReadOnly() {
>> 907:             return perms.isReadOnly();
> 
> You could just return true here. Either way is ok with me.

Yeah, but since we do call `perms.setReadOnly()` in the constructor I figured I'll it this way.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21165#discussion_r1773730593


More information about the security-dev mailing list