RFR: 8002070 Remove the stack search for a resource bundle for Logger to use

Jim Gish jim.gish at oracle.com
Thu Mar 7 21:50:20 UTC 2013


On 03/06/2013 03:42 PM, Mandy Chung wrote:
>
>>>
>>> LoggerResourceBundleRace.java: I think what you really want is to 
>>> add a new test that sets a context class loader to a class loader 
>>> that finds the resource bundle for a logger that a system class 
>>> loader can't find.   I suggest to leave this test as it is and then 
>>> add a new test to exercise the context class loader search of a 
>>> resource bundle as a separate RFE that will improve the test coverage.
>> Leaving the existing test as is not an option unless we change the 
>> test to run in othervm as I had on my first webrev.  The bundles are 
>> not found otherwise.  Hence the change to set the context classloader.
>
> I'm confused.  Is the resource bundle 
> "LoggerResourceBundleRace$MyResources" in the classpath as this test 
> class is located?  Should the system class loader be able to find 
> them? This test shouldn't depend on the stack search. Shouldn't  the 
> thread context classloader be null and then use the system class 
> loader?  Is another test set the thread context classloader in the 
> jtreg run? Does the test pass if you run it directly (not via jtreg)?
>
>
I figured it out.  I was running jtreg locally with -s -- samevm. In 
this case, the bundles can't be found via the system classloader.  
However, both directly running the tests and running in jprt which uses 
jtreg -a (agentvm) works fine.  I can leave the test as is.

Thanks,
    Jim

-- 
Jim Gish | Consulting Member of Technical Staff | +1.781.442.0304
Oracle Java Platform Group | Core Libraries Team
35 Network Drive
Burlington, MA 01803
jim.gish at oracle.com




More information about the core-libs-dev mailing list