Skip to content

[WIP] Use JDK14 switch expressions - checkstyle needs to be updated#6202

Closed
koppor wants to merge 3 commits into
masterfrom
use-jdk14-features
Closed

[WIP] Use JDK14 switch expressions - checkstyle needs to be updated#6202
koppor wants to merge 3 commits into
masterfrom
use-jdk14-features

Conversation

@koppor

@koppor koppor commented Mar 29, 2020

Copy link
Copy Markdown
Member

I applied some IntelliJ suggestions - also includes using JDK14 switch expressions. This causes issues at checkstyle.

@koppor koppor added the dev: code-quality Issues related to code or architecture decisions label Mar 29, 2020

@Siedlerchr Siedlerchr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next time please consider fixing an issue instead of just code refactorings.

@koppor

koppor commented Mar 29, 2020

Copy link
Copy Markdown
Member Author

It was a "drive-by-shooting" while I was working on something else. Further, the wish was to keep pull requests small to easy reviewing (@stefan-kolb). Therefore, I spent effort to separate the easy-to-review things from another PR (not yet opened). This helps

  • speed up reviewing
  • speed up getting changes into master
  • keep PRs small (if possible)

@koppor koppor changed the title Improve code based on IntelliJ' suggestions [WIP] Use JDK14 switch expressions - checkstyle needs to be updated Mar 29, 2020
@koppor

koppor commented Mar 29, 2020

Copy link
Copy Markdown
Member Author

Blocked by checkstyle/checkstyle#7992.


for (i = 0; i < (x - 2); i++) {
sb.append(authors[i]).append("; ");
case 1 -> s = authors[0]; // just no action

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use the full power of the switch expressions and write String s = switch (...) ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IntelliJ did not recommend it ^^. Just submit an update here :)

@koppor koppor added the status: depends-on-external A bug or issue that depends on an update of an external library label Mar 30, 2020
@koppor

koppor commented Mar 30, 2020

Copy link
Copy Markdown
Member Author

ETA for the fix September 2020.

This partially reverts commit 6a14740.
@koppor

koppor commented Mar 30, 2020

Copy link
Copy Markdown
Member Author

Closed to reduce the noise.

@koppor koppor closed this Mar 30, 2020
@koppor koppor deleted the use-jdk14-features branch March 30, 2020 17:31
koppor pushed a commit that referenced this pull request Oct 15, 2022
4eee79a Fix director not showing in MHRAs (#6271)
20c4b5e Update the-journal-of-pain.csl (#6202)
6ba269f Added missing book volume in short-title-note (#6262)
1a11c0f Update harvard-stellenbosch-university.csl (#6256)
6b598e7 Update karstenia.csl (#6242)
38bc5fe APA: Swap priority for periodical page and number (#6255)

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: 4eee79a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev: code-quality Issues related to code or architecture decisions status: depends-on-external A bug or issue that depends on an update of an external library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants