RFR 8177076: jshell tool: allow non-zero /exit

Jan Lahoda jan.lahoda at oracle.com
Thu Nov 2 13:05:54 UTC 2017


Looks good to me!

Jan

On 1.11.2017 18:35, Robert Field wrote:
> A minor update with improvements I was mulling over while I should have
> been sleeping:
>
>      http://cr.openjdk.java.net/~rfield/8185840v1.webrev/
>
> -Robert
>
> On 10/31/17 22:26, Robert Field wrote:
>> The seed of this is the ability to exit the jshell tool with a user
>> specified exit code.  For example:
>>
>>     /exit result > base ? 0 : 7
>>
>> However, this requires the tool launching API to support passing on
>> the exit code.
>> In turn, this requires the tool to return exit codes, and do so
>> correctly for tool errors.
>>
>> This is the first case of a command taking a snippet as an argument.
>> Input continuation was tied to snippet input processing.
>> Input, continuation, command, and snippet processing needed to be
>> unraveled.
>>
>> Diagnostic display, formerly only needed for snippets, needed to be
>> refactored.
>>
>> Tab completion needed to be handled in this new case (note integer
>> context).
>>
>> On testing side, StartOptionTest and its subclass ToolProviderTest
>> were a teetering pile of spaghetti that were not amenable to
>> the additional demands of the new needed tests.  They have been revamped.
>>
>> Bugs:
>>
>>     8177076: jshell tool: allow non-zero /exit
>>     https://bugs.openjdk.java.net/browse/JDK-8185840
>>
>>     8190383: JShell API: no way for the jshell tool to report exit
>> status to provider
>>     https://bugs.openjdk.java.net/browse/JDK-8190383
>>
>> Webrev:
>>
>>     http://cr.openjdk.java.net/~rfield/8185840v0.webrev/
>>
>> Thanks,
>> Robert
>>
>


More information about the kulla-dev mailing list