On Thu, 5 May 2022 10:30:17 GMT, Pavel Rappo <pra...@openjdk.org> wrote:
>> Please review some cleanup updates to address issues reported by an IDE. >> >> The seeds for the change were a series of redundant casts, that have now all >> been removed. Various other warnings and suggestions were made by the IDE >> for the affected files. There were a number of places with redundant type >> arguments, for which the general fix was in favor of using `var` instead of >> `<>`. >> >> Some `switch` statements were converted to the enhanced `switch` form, which >> also revealed a couple of places where `RECORD` should have been added >> alongside `ENUM`. > > src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ElementsTable.java > line 1206: > >> 1204: AccessKind accessValue = null; >> 1205: for (ElementKind kind : ALLOWED_KINDS) { >> 1206: accessValue = switch (kind) { > > It feels awkward when adjacent `switch` statements use different formatting. Correction: `switch` _expressions_ in this case. ------------- PR: https://git.openjdk.java.net/jdk/pull/8543