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

Apply AutoCloseableMustBeClosed #1009

Closed
wants to merge 2 commits into from
Closed

Conversation

schlosna
Copy link
Contributor

@schlosna schlosna commented Mar 5, 2021

Apply AutoCloseableMustBeClosed from palantir/gradle-baseline#1673

Before this PR

Methods returning AutoCloseable were not marked as @MustBeClosed

After this PR

==COMMIT_MSG==
Methods returning AutoCloseable marked as @MustBeClosed

./gradlew clean compileJava compileTestJava -PerrorProneApply=AutoCloseableMustBeClosed
./gradlew format
==COMMIT_MSG==

Possible downsides?

@changelog-app
Copy link

changelog-app bot commented Mar 5, 2021

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Methods returning AutoCloseable marked as @MustBeClosed

./gradlew clean compileJava compileTestJava -PerrorProneApply=AutoCloseableMustBeClosed
./gradlew format

Check the box to generate changelog(s)

  • Generate changelog entry

@schlosna schlosna marked this pull request as ready for review March 8, 2021 00:31
@policy-bot policy-bot bot requested a review from jkozlowski March 8, 2021 00:31
@@ -53,21 +54,25 @@
}

@Override
@MustBeClosed
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps we should disable these on overrides unless the overridden method is also annotated with @MustBeClosed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that would help avoid some noise as this rolls out, then we can ratchet it up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

schlosna and others added 2 commits March 13, 2021 13:24
./gradlew compileJava compileTestJava -PerrorProneApply=AutoCloseableMustBeClosed
@schlosna schlosna force-pushed the ds/AutoCloseableMustBeClosed branch from 6b83b29 to 92b072f Compare March 13, 2021 18:26
@stale
Copy link

stale bot commented May 6, 2021

This PR has been automatically marked as stale because it has not been touched in the last 14 days. If you'd like to keep it open, please leave a comment or add the 'long-lived' label, otherwise it'll be closed in 7 days.

@stale stale bot added the stale label May 6, 2021
@policy-bot policy-bot bot requested a review from ferozco May 6, 2021 21:34
@stale stale bot closed this Jun 11, 2021
@schlosna schlosna deleted the ds/AutoCloseableMustBeClosed branch January 11, 2022 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants