RFR: 8319332: Security properties files inclusion [v18]
Martin Balao
mbalao at openjdk.org
Wed Aug 7 19:16:38 UTC 2024
On Wed, 7 Aug 2024 17:52:10 GMT, Weijun Wang <weijun at openjdk.org> wrote:
>> Francisco Ferrari Bihurriet has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Throw an IllegalArgumentException exception if Security.setProperty("include", ...) is invoked.
>>
>> Co-authored-by: Martin Balao <mbalao at redhat.com>
>> Co-authored-by: Francisco Ferrari Bihurriet <fferrari at redhat.com>
>
> src/java.base/share/classes/java/security/Security.java line 211:
>
>> 209: }
>> 210:
>> 211: private static void reset(LoadingMode mode) {
>
> The method here looks like there is a chance that `props` does not get assigned. I know when the main file is loaded the mode is OVERRIDE, so this will not actually happen. Do you want to add a comment on this?
>
> Or, maybe we can assign `props` at the beginning and use APPEND mode when loading the main file?
Ok, we will change this to initialize `props` statically and then, if needed because of an OVERRIDE, do a `clear` of the properties map.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16483#discussion_r1707718877
More information about the security-dev
mailing list