Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 3 commits into from

Conversation

koppor
Copy link
Member

@koppor koppor commented Mar 29, 2020

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

@koppor koppor added the type: code-quality Issues related to code or architecture decisions label Mar 29, 2020
Copy link
Member

@Siedlerchr Siedlerchr left a comment

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
Copy link
Member Author

koppor commented Mar 29, 2020

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
Copy link
Member Author

koppor commented Mar 29, 2020

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
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
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
Copy link
Member Author

koppor commented Mar 30, 2020

ETA for the fix September 2020.

This partially reverts commit 6a14740.
@koppor
Copy link
Member Author

koppor commented Mar 30, 2020

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
status: depends-on-external A bug or issue that depends on an update of an external library type: code-quality Issues related to code or architecture decisions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants