On Mon, 24 May 2021 13:46:58 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:
>> 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? > > src/java.base/share/classes/java/util/zip/ZipOutputStream.java line 261: > >> 259: ZipEntry e = current.entry; >> 260: switch (e.method) { >> 261: case DEFLATED -> { > > Same remark here - it's not clear what's going on. Here, it's mostly indentation change (+4 spaces). You can set "Hide whitespace changes" and see:  Alternatively, I can indent back this switch, placing `case` on the same indentation level as `switch`. I'm not sure about recommended code style in OpenJDK project, it looks like it's not very consistent. ------------- PR: https://git.openjdk.java.net/jdk/pull/4161