RFR: JDK-8264222: Use switch expression in jshell where possible

Tagir F.Valeev tvaleev at openjdk.java.net
Fri Mar 26 00:49:31 UTC 2021


This change is powered by IntelliJ IDEA quick-fix.
I also took the liberty to fix C-style arrays in changed files.

In SourceCodeAnalysisImpl.java:501, I left case PARAMETERIZED_TYPE -> FALSE as a separate switch case, because it had a comment. Better formatting ideas are welcome.

If you like this, I can provide similar PR in other components as well (e.g. in javac)

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

Commit messages:
 - Use switch expression where possible

Changes: https://git.openjdk.java.net/jdk/pull/3210/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3210&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8264222
  Stats: 139 lines in 5 files changed: 0 ins; 78 del; 61 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3210.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3210/head:pull/3210

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


More information about the kulla-dev mailing list