See my separate thread on an picking import set of rules we can all use in our IDEs. Let pick something and then do an organize imports.
Gary <div>-------- Original message --------</div><div>From: Remko Popma <[email protected]> </div><div>Date:05/16/2014 09:36 (GMT-05:00) </div><div>To: Log4J Developers List <[email protected]> </div><div>Subject: Re: Getting some failing tests in log4j-core </div><div> </div>It was caused by the package rename from core.helpers to core.util: The Loader class is in package core.util, but the package of this test is still core.helpers. The inner class MyClock is package protected, so invisible to the Loader class. Fixed by moving all tests in core.helpers to core.util. All tests now pass. I'll also change the individual static imports back to .* imports for the classes I'm moving. Not sure if we should do an "organize imports" to fix all static imports... On Fri, May 16, 2014 at 10:19 PM, Remko Popma <[email protected]> wrote: The reason for the failing test is: java.lang.IllegalAccessException: Class org.apache.logging.log4j.core.util.Loader can not access a member of class org.apache.logging.log4j.core.helpers.ClockFactoryTest$MyClock with modifiers "" Problem in the core.util.Loader class. The loadClass method will return the result of return Class.forName(className, true, getTCL()); This _seems_ to work, no exceptions, the class is not null, but when calling clazz.getConstructor().newInstance(); an exception is raised. This exception is caught, and clazz.newInstance() is called, which throws the above exception... On Fri, May 16, 2014 at 10:08 PM, Remko Popma <[email protected]> wrote: I have the same problem. Taking a look now. On Thu, May 15, 2014 at 1:42 AM, Matt Sicker <[email protected]> wrote: Failed tests: ClockFactoryTest.testCustomClock:82 expected:<class org.apache.logging.log4j.core.helpers.ClockFactoryTest$MyClock> but was:<class org.apache.logging.log4j.core.util.SystemClock> PatternParserTest.testCustomPattern:106 Expected to end with: INFO [PatternParserTest :96 ] - Hello, world . Actual: [20140514 11:39:40,302] INFO [PatternParserTest :95 ] - Hello, world Anyone else able to reproduce this? I just installed the JDK9 early access release to test it out, and I'm not sure if this is due to JDK9 or a failing test in general. -- Matt Sicker <[email protected]>
