RFR: 8259820: JShell does not handle -source 8 properly

Jan Lahoda jlahoda at openjdk.java.net
Fri Jan 15 09:34:13 UTC 2021


When running JShell with `-C-source -C8`, only one (non-import) snippet can be processed. This is because, when cleaning javac state, the `REPL` package is looked up in the unnamed package, but with `-source 8`, there is no unnamed package, so the `REPL` package is not found and cleared properly. The proposed solution is to use `noModule` when running in non-module mode (i.e. with `-source 8`).

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

Commit messages:
 - Adding @modules to test.
 - 8259820: JShell does not handle -source 8 properly

Changes: https://git.openjdk.java.net/jdk/pull/2097/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2097&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8259820
  Stats: 58 lines in 2 files changed: 56 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2097.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2097/head:pull/2097

PR: https://git.openjdk.java.net/jdk/pull/2097


More information about the kulla-dev mailing list