On Wed, 23 Aug 2023 15:41:16 GMT, Sean Coffey <[email protected]> wrote:
> Recursive initialization calls possible during loading of LoggerFinder
> service.
>
> This fix detects the recursive call and returns a temporary LoggerFinder that
> is backed by a lazy logger. Automated test case developed to simulate loading
> of an external LoggerFinder service while also having other threads poke
> System.getLogger during this framework initialization.
Thanks for the feedback @dfuch - good to have decent comments in such code.
Good call on using `LazyLoggers.getLogger` in place of
`LazyLoggers.getLoggerFromFinder` also. Changes implemented.
the Security.setProperty("test_2", "test") call is made after loading of the
LoggerFinder framework should be complete. It's there for a sanity check. I
also have Logger class type checks in the test. I've increased coverage in this
area with run test in multi-thread/non multi-thread and customer logger finder
versus default logger finder mode.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15404#issuecomment-1691455879