[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR: 8160950 Agent JAR added to app class loader rather than system class loader when running wi
From:       "serguei.spitsyn () oracle ! com" <serguei ! spitsyn () oracle ! com>
Date:       2016-09-08 22:02:42
Message-ID: ffb3bf64-3e9d-2949-9739-188474349fb4 () oracle ! com
[Download RAW message or body]

Mandy,

Thank you for the review.


On 9/8/16 14:55, Mandy Chung wrote:
> > On Sep 7, 2016, at 12:27 PM, serguei.spitsyn@oracle.com wrote:
> > 
> > Webrev:
> > http://cr.openjdk.java.net/~sspitsyn/webrevs/2016/jdk/8160950-JLI-WLS.jdk2/
> 
> CustomLoader.java
> 62             File f   = new File(System.getProperty("test.classes", "."), \
> "Agent.class"); 
> CustomLoader should load Agent.class from Agent.jar that was added after \
> appendToClassPathForInstrumentation is called.

Good suggestion.
This had to be in the first place.


> 
> Agent.java
> 43     public static void
> 44     premain(String agentArgs, Instrumentation instrumentation) {
> 
> Nit: maybe merge two lines and rename "instrumentation" variable to inst, if you \
> want to shorten the line.

Ok.


> 
> The test needs @modules java.instrument; otherwise the test will fail when running \
> in a minimal image without java.instrument module.

Good catch, thanks.

> 
> I like David's suggestion on the simplified error message:
> "Unable to add %s to system class path\n"

Agreed.


Thanks!
Serguei

> 
> Mandy


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic