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

Jan Lahoda jlahoda at openjdk.org
Tue Apr 22 18:29:56 UTC 2025


> 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

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/22850/files
  - new: https://git.openjdk.org/jdk/pull/22850/files/fd8f2aa5..e12db64c

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=22850&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22850&range=00-01

  Stats: 638862 lines in 9293 files changed: 235288 ins; 354348 del; 49226 mod
  Patch: https://git.openjdk.org/jdk/pull/22850.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22850/head:pull/22850

PR: https://git.openjdk.org/jdk/pull/22850


More information about the kulla-dev mailing list