-
Notifications
You must be signed in to change notification settings - Fork 40.9k
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
Formatter conflicts with "Only one statement per line" checkstyle rule #17637
Comments
@philwebb can you please transfer the issue to the |
There are examples where the formatter accepts this style.
Difference here: The second autoclosable doesn't depend on the first. |
Apparently not! The GitHub UI doesn't seem to offer it to me. Perhaps it's because it's part of a different organization. I'll do a brute force copy paste. We actually hit it ourselves (see this comment) and in the end decided that fixing it would take more effort than refactoring the code to use multiple try blocks. @michael-simons can you use the following form for now? try (Session session = this.driver.session()) {
try (Transaction tx = session.beginTransaction()) {
// Do something
}
} |
Of course. |
I have the following code:
Spring Java Format complains
Fix turns the snippet into
Checkstyle complains
OneStatementPerLine
.I have no clue how to format the thing.
The text was updated successfully, but these errors were encountered: