RFR: 8319332: Security properties files inclusion [v17]

Martin Balao mbalao at openjdk.org
Tue Aug 6 23:55:06 UTC 2024


On Tue, 6 Aug 2024 23:19:08 GMT, Martin Balao <mbalao at openjdk.org> wrote:

>> src/java.base/share/classes/java/security/Security.java line 901:
>> 
>>> 899:         if (SecPropLoader.isInclude(key)) {
>>> 900:             return;
>>> 901:         }
>> 
>> Don't you want to throw an exception here?
>
> May be. This is a public API that only documents `SecurityException` for cases in which there is a Security Manager and `NullPointerException` for cases in which either the key or the value are `null`. Wouldn't be the exact case here, unless we stretch it a bit and document a new type of unchecked exception. I was thinking of `IllegalArgumentException`. What do you think?

Proposed a change here: https://github.com/openjdk/jdk/pull/16483/commits/530bd81c2a73a39f00c6ba9524752f30600cd04d

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16483#discussion_r1706222752



More information about the security-dev mailing list