RFR: 6640188: Methods com.sun.tools.attach.VirtualMachine.load... don't throw NullPointerException

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

RFR: 6640188: Methods com.sun.tools.attach.VirtualMachine.load... don't throw NullPointerException

Gary Adams-3
Here's a simple fix to add explicit checks for the loadAgentXXX methods to
ensure NPE is thrown when null arguments are passed. Several other
management
methods have similar provider not null checks, they just were not
present for
agent path and library methods. This should remove the spec ambiguity with
AgentLoadException which was being thrown.

   Issue: https://bugs.openjdk.java.net/browse/JDK-6640188
   Webrev: http://cr.openjdk.java.net/~gadams/6640188/
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 6640188: Methods com.sun.tools.attach.VirtualMachine.load... don't throw NullPointerException

serguei.spitsyn@oracle.com
Hi Gary,

The fix looks good.
I agree, the other null checks are already covered in the
VirtualMachine.java.


Thanks,
Serguei


On 1/4/18 07:54, [hidden email] wrote:

> Here's a simple fix to add explicit checks for the loadAgentXXX
> methods to
> ensure NPE is thrown when null arguments are passed. Several other
> management
> methods have similar provider not null checks, they just were not
> present for
> agent path and library methods. This should remove the spec ambiguity
> with
> AgentLoadException which was being thrown.
>
>   Issue: https://bugs.openjdk.java.net/browse/JDK-6640188
>   Webrev: http://cr.openjdk.java.net/~gadams/6640188/