RFR(s): 8170664: SystemLoggerInPlatformLoader.java failing in case of module limitation

Daniel Fuchs daniel.fuchs at oracle.com
Mon Dec 5 18:40:09 UTC 2016

On 05/12/16 14:50, Sergei Kovalev wrote:
> Hi Team,
> Could you please review a small change for regression test?

Hi Sergei,

Could you try with:

if (Layer.boot().findModule("java.logging").isPresent()) {
     // expect JdkLazyLogger
} else {
     // expect SimpleConsoleLogger

That shouldn't require any usage of jdk.internal APIs.

best regards,

-- daniel

> BugID: JDK-8170664
> Webrev: http://cr.openjdk.java.net/~skovalev/8170664/webrev.00/
> Issue: One test fails in case of usage command line option
> "--limit-module java.base".
> Summary: The test has written in assumption that JDK always has
> java.util.logging module on board. In reality we can limit JDK by
> java.base only. In this case JDK will have only SimpleConsoleLogger on
> board and the test failing. The fix adds a check for limited logging
> ability and introduce a separate branch in the test for
> SimpleConsoleLogger case.

More information about the core-libs-dev mailing list