RFR: 8267587: Update java.util to use enhanced switch

Tagir F.Valeev tvaleev at openjdk.java.net
Mon May 24 04:33:40 UTC 2021


Inspired by PR#4088. Most of the changes are done automatically using IntelliJ IDEA refactoring. Some manual adjustments are also performed, including indentations, moving comments, extracting common cast out of switch expression branches, etc.

I also noticed that there are some switches having one branch only in JapaneseImperialCalendar.java. Probably it would be better to replace them with `if` statement?

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

Commit messages:
 - 8267587: Update java.util to use enhanced switch

Changes: https://git.openjdk.java.net/jdk/pull/4161/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4161&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8267587
  Stats: 887 lines in 17 files changed: 113 ins; 339 del; 435 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4161.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4161/head:pull/4161

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


More information about the security-dev mailing list