RFR(S): JDK-7041183 Improve error handling in Improve error handling in src/share/vm/services/management.cpp

David Holmes david.holmes at oracle.com
Mon Nov 2 01:40:45 UTC 2015


Hi,

On 30/10/2015 9:01 PM, Dmitry Samersoff wrote:
> Everybody,
>
> (* On behalf of Jini George <jini.george at oracle.com> *)
>
> Please review the fix
>
> http://cr.openjdk.java.net/~dsamersoff/sponsorship/jingeorg/JDK-7041183/webrev.01/

If you throw IllegalArgumentException it should be obvious at the Java 
level which argument is illegal and why. I can't tell at the Java level 
how that can come about - these seem to be methods invoked on a 
MemoryPoolMXBean - see for example:

https://bugs.openjdk.java.net/browse/JDK-8025089

so the "illegal argument" would seem to be "this" ???


I don't see any changes to the code that would currently throw Internal 
Error ??

The asserts for pool!=NULL seem rather pointless as the method has been 
changed to never return null. If you really want the assert add it to 
the end of the method being called, rather than placing at all the call 
sites.


Thanks,
David

> -Dmitry
>


More information about the serviceability-dev mailing list