On Wed, 7 Aug 2024 17:52:10 GMT, Weijun Wang <wei...@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 <mba...@redhat.com> >> Co-authored-by: Francisco Ferrari Bihurriet <fferr...@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