RFR 8167128: jshell tool: /drop of statement gives confusing output
Jan Lahoda
jan.lahoda at oracle.com
Mon Oct 10 15:43:06 UTC 2016
Makes sense to me, seem fine.
Jan
On 7.10.2016 19:19, Robert Field wrote:
> Using /drop on anything other than a declaration in the jshell tool
> gives an error (and a confusing one at that).
> For example, dropping a statement or variable value query causes an error.
> The underlying cause is that drop() in the API only has semantic impact
> when declarations are changed and so was restricted to declarations.
> If does however also change the status and the tool uses the status, for
> example to determine which snippets are saved or, by default, listed.
> There is no advantage to this restriction and it reduces symmetry. This
> change allows drop (at all levels) for all kinds of snippets.
>
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8167128
>
> Webrev:
> http://cr.openjdk.java.net/~rfield/8167128v0.webrev/
>
> API:
> http://cr.openjdk.java.net/~rfield/8167128v0.API/
>
> The API changes are minor and include:
> http://cr.openjdk.java.net/~rfield/8167128v0.API/jdk/jshell/JShell.html#drop-jdk.jshell.Snippet-
>
> http://cr.openjdk.java.net/~rfield/8167128v0.API/jdk/jshell/PersistentSnippet.html
>
> http://cr.openjdk.java.net/~rfield/8167128v0.API/jdk/jshell/Snippet.Status.html
>
>
> Thanks,
> Robert
>
More information about the kulla-dev
mailing list