Skip to content

Conversation

@joanvr
Copy link
Contributor

@joanvr joanvr commented Aug 24, 2023

What's changed?

Try with resources can have side effects (closing the streams) even with empty try blocks. So we cannot delete it safely.

Modified the emptyTry test to not have resources (so it's removed because it's empty), and added a new emptyTryWithResources that is actually not removed because it has resources.

Anyone you would like to review specifically?

@kmccarp

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've added the license header to any new files through ./gradlew licenseFormat
  • I've used the IntelliJ IDEA auto-formatter on affected files
  • I've updated the documentation (if applicable)

@joanvr joanvr requested a review from kmccarp August 24, 2023 13:46
@joanvr joanvr requested review from kmccarp and sambsnyd August 24, 2023 15:37
@sambsnyd sambsnyd merged commit 31491f3 into main Aug 24, 2023
@sambsnyd sambsnyd deleted the bug/removed-try-with-non-empty-resources branch August 24, 2023 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants