RFR: 8341833: incomplete snippet from loaded files from command line is ignored [v2]

Chen Liang liach at openjdk.org
Wed Apr 23 03:08:47 UTC 2025


On Tue, 22 Apr 2025 18:29:56 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>
>
> Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
> 
>  - Fixing test.
>  - Merge branch 'master' into JDK-8341833
>  - 8341833: incomplete snippet from loaded files from command line is ignored

The test changes look good.

-------------

Marked as reviewed by liach (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/22850#pullrequestreview-2785822217


More information about the kulla-dev mailing list