RFR: 8155246: Throw error if default java.security file is missing [v2]

Sean Mullan mullan at openjdk.org
Wed Aug 10 14:46:33 UTC 2022


On Wed, 10 Aug 2022 14:22:43 GMT, Sean Coffey <coffeys at openjdk.org> wrote:

>> src/java.base/share/classes/java/security/Security.java line 52:
>> 
>>> 50:  * @implNote If the master security properties file is missing, the JDK
>>> 51:  * implementation will throw an {@code InternalError} when initializing the
>>> 52:  * {@code Security} class.
>> 
>> Is "master security properties file" the right term here? The only use of "master" in this class seems to be a deprecated method.
>> 
>> I'm also not sure about the word "missing" as there can be many reasons why opening a file may fail, e.g. something changes the permissions or file owner so that it can't be opened for example.
>> 
>> The implNote need not be specific on the exception that is thrown, it could say "will throw an unspecified exception ..."
>
> The opening line of the java.security file denotes it as the "master security properties file". I think it works well but open to suggestions. Maybe we can re-use the terminology from previous paragraph.
> 
> Fair point about the "missing" and error clause -- perhaps:
>  ```
> @implNote If the file containing the default values of security properties fails to load,
>  * the JDK implementation will throw an unspecified error when initializing the
>  * {@code Security} class.

I think if you just said "If this properties file ..." it would be sufficient, as the previous paragraph provided enough context as to what you are referring to.

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

PR: https://git.openjdk.org/jdk/pull/9747



More information about the security-dev mailing list