RFR: 8341833: incomplete snippet from loaded files from command line is ignored
Adam Sotona
asotona at openjdk.org
Thu Apr 17 07:23:43 UTC 2025
On Fri, 20 Dec 2024 17:32:33 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
> If JShell is run with a parameter that is a file, and the file ends with an incomplete snippet, the incomplete snippet is ignored.
>
> For example:
>
> t.jsh:
> class {
>
>
> jshell /tmp/t.jsh
> | Welcome to JShell -- Version 21.0.5
> | For an introduction type: /help intro
>
> jshell>
>
>
> This PR proposes to produce an explicit error in this case:
>
> $ jshell /tmp/t.jsh
> Building target 'default (exploded-image)' in configuration 'linux-x86_64-server-release'
> Finished building target 'default (exploded-image)' in configuration 'linux-x86_64-server-release'
> Incomplete input: class {
> | Welcome to JShell -- Version 25-internal
> | For an introduction type: /help intro
>
> jshell>
Looks good to me.
-------------
Marked as reviewed by asotona (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/22850#pullrequestreview-2774829474
More information about the kulla-dev
mailing list