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

Mandy Chung mandy.chung at oracle.com
Tue Dec 6 22:03:49 UTC 2016


> On Dec 6, 2016, at 9:49 AM, Daniel Fuchs <daniel.fuchs at oracle.com> wrote:
> 
> On 06/12/16 17:30, Mandy Chung wrote:
>> 
>>> On Dec 6, 2016, at 1:36 AM, Sergei Kovalev <sergei.kovalev at oracle.com> wrote:
>>> 
>>> Hi Daniel,
>>> 
>>> Please take a look at http://cr.openjdk.java.net/~skovalev/8170664/webrev.01/
>> 
>> 109         boolean simleConsoleOnly = !Layer.boot().findModule("java.logging").isPresent();
>> 
>> typo: s/simle/simple
>> 
>> 107         Class sploggerType = splogger.getClass();
>>  :
>> 123             Class sloggerType = slogger.getClass();
>> 124             System.out.println("slogger: " + sloggerType);
>> 125             if (sloggerType.equals(sploggerType)) {
>> 
>> This check is redundant.  Is this the intended check?
>> 
>> Assuming the above check is not needed, you can further simplify something like this:
>> 
>> String expectedType = Layer.boot().findModule("java.logging").isPresent()
>>    ? "SimpleConsoleLogger" : "JdkLazyLogger”;
> 
> Hi Mandy,
> 
> No it's not redundant. Sorry for using bad variable names
> which differ only by 1 letter.

Ah I missed that one character difference.  Perhaps removing letter “s” would make it easier to distinguish.

There are a couple raw type Class.  It might be good to change them to Class<?>.

otherwise looks fine.
Mandy



More information about the core-libs-dev mailing list