RFR 8185108: JShell: NullPointerException when throwing exception with null message under local ExecutionControl

Jan Lahoda jan.lahoda at oracle.com
Wed Aug 23 19:42:04 UTC 2017


Overall, looks OK.

I wonder if we can send a marker bit (null/non-null) optionally followed 
by the UTF String instead of a marker UTF/text?

Thanks,
     Jan

On 19.8.2017 02:00, Robert Field wrote:
> Please review fixes to handling of SnippetEvent.exception().getMessage()
>
> Bug:
>
>      https://bugs.openjdk.java.net/browse/JDK-8185108
>
> Webrev:
>
>      http://cr.openjdk.java.net/~rfield/8185108v0.webrev/
>
> Issues addressed --
>
> (1) Original issue: using API and DirectExecutionControl (which was not
> intended for direct use), user exceptions with no message (null message)
> crashes eval()
>
> (2) Like (1) above with LocalExecutionControlProvider (which is intended
> for direct use)
>
> (3) Because of (2), "jshell --execution local" crashes with the input
> "throw new java.io.IOException();"
>
> (4) Under default ExecutionControl, exceptions with null messages
> actually return an empty string message in the API.
>
> (5) Because of (4), the default configuration of the jshell tool
> displays a colon that it shouldn't for "throw new java.io.IOException();"
>
> (6) Handling of the streaming representation of a null message was being
> handled in the jdk.jshell package (Eval.java) whereas it should be
> handled in the streaming ExecutionControl support.
>
> (7) The poorly placed implementation of (6) was out-of-sync with the
> behavior of the streaming ExecutionControl support, being the immediate
> cause of (4)
>
>


More information about the kulla-dev mailing list