RFR (S) 8025638: jmap returns 0 instead of 1 when it fails.

Staffan Larsen staffan.larsen at oracle.com
Thu Oct 10 13:00:32 UTC 2013


Yes, you are right. Still, a default value of 1 would make the code more obvious.

Reviewed.

/Staffan

On 10 okt 2013, at 14:57, Fredrik Arvidsson <fredrik.arvidsson at oracle.com> wrote:

> Thanks for reviewing.
> 
> Regarding default value of returnstatus. If start() throws an unhandled exception, would not the Java runtime return 1 for us?
> The try {} clause does not catch anything, it just calls stop() on finally.
> 
> /F
> 
> On 2013-10-10 13:49, Staffan Larsen wrote:
>> Thanks for doing this!
>> 
>> Tool.java:116 - shouldn't the default return value be 1? In case start() throws an exception for some reason.
>> 
>> Tool.java: I find the start(String[] args), start(), startInternal() methods confusing in naming and usage. Not directly related to your change of course, just a comment on the code.
>> 
>> /Staffan
>> 
>> 
>> On 10 okt 2013, at 13:38, Staffan Larsen <staffan.larsen at oracle.com> wrote:
>> 
>>> Clicking on the link in this email takes me to the wrong webrev. The correct URL is in the text: http://cr.openjdk.java.net/~allwin/farvidss/8025638/webrev.00/
>>> 
>>> /Staffan
>>> 
>>> On 10 okt 2013, at 12:42, Fredrik Arvidsson <fredrik.arvidsson at oracle.com> wrote:
>>> 
>>>> Hi
>>>> 
>>>> Please help me to review the changes below:
>>>> 
>>>> Jira case: https://bugs.openjdk.java.net/browse/JDK-8025638
>>>> Webrev: http://cr.openjdk.java.net/~allwin/farvidss/8025638/webrev.00/
>>>> 
>>>> About this change.
>>>> A previous change (https://bugs.openjdk.java.net/browse/JDK-8010278) in the Tool.java class caused any tool deriving from this base class return the wrong value to the caller when failing. 
>>>> Changes were made to the Tool.java class and to the derived tool implementation classes to handle errors/exceptions during execution and ensure that the tool returns 1 to the caller if it fails, and 0 if it succeeds. 
>>>> 
>>>> Previously failed Aurora tests have been run using UTE and verified to PASS.
>>>> 
>>>> Cheers
>>>> /Fredrik
>>> 
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20131010/5de4e6f2/attachment.htm>


More information about the hotspot-gc-dev mailing list