There are a few small typos in SnippetEvent.toString():
* There is a missing equals sign in the display of the "causeSnippet"
* There is a missing comma before the display of "value"
* There is a missing comma before the display of "exception"
Demonstration setup:
$ jshell
| Welcome to JShell -- Version 23
| For an introduction type: /help intro
jshell> var jsh = jdk.jshell.JShell.builder().build();
jsh ==> jdk.jshell.JShell@551bdc27
Demonstration of first problem:
jshell> jsh.eval("*").get(0)
$10 ==> SnippetEvent(snippet=Snippet:ErroneousKey#9*,previousStatus=NONEXISTENT,status=REJECTED,isSignatureChange=false,causeSnippetnull)
Demonstration of second problem:
jshell> jsh.eval("123").get(0)
$9 ==> SnippetEvent(snippet=Snippet:VariableKey($2)#8-123,previousStatus=NONEXISTENT,status=VALID,isSignatureChange=true,causeSnippetnullvalue=123)
Demonstration of third problem:
jshell> jsh.eval("throw new Exception(\"foo2\");").get(0)
$8 ==> SnippetEvent(snippet=Snippet:StatementKey#7-throw new Exception("foo2");,previousStatus=NONEXISTENT,status=VALID,isSignatureChange=true,causeSnippetnullexception=jdk.jshell.EvalException: foo2)
* There is a missing equals sign in the display of the "causeSnippet"
* There is a missing comma before the display of "value"
* There is a missing comma before the display of "exception"
Demonstration setup:
$ jshell
| Welcome to JShell -- Version 23
| For an introduction type: /help intro
jshell> var jsh = jdk.jshell.JShell.builder().build();
jsh ==> jdk.jshell.JShell@551bdc27
Demonstration of first problem:
jshell> jsh.eval("*").get(0)
$10 ==> SnippetEvent(snippet=Snippet:ErroneousKey#9*,previousStatus=NONEXISTENT,status=REJECTED,isSignatureChange=false,causeSnippetnull)
Demonstration of second problem:
jshell> jsh.eval("123").get(0)
$9 ==> SnippetEvent(snippet=Snippet:VariableKey($2)#8-123,previousStatus=NONEXISTENT,status=VALID,isSignatureChange=true,causeSnippetnullvalue=123)
Demonstration of third problem:
jshell> jsh.eval("throw new Exception(\"foo2\");").get(0)
$8 ==> SnippetEvent(snippet=Snippet:StatementKey#7-throw new Exception("foo2");,previousStatus=NONEXISTENT,status=VALID,isSignatureChange=true,causeSnippetnullexception=jdk.jshell.EvalException: foo2)
- links to
-
Commit(master) openjdk/jdk/6012e8d2
-
Review(master) openjdk/jdk/23809