Repository navigation
Annotate @MustBeClosed methods and fix unclosed streams - #8392
Merged
Merged
Conversation
This was referenced Nov 27, 2026
labkey-adam
requested review from
labkey-jeckels,
labkey-matthewb and
labkey-nicka
November 27, 2026 20:05
labkey-adam
added a commit
to LabKey/MacCossLabModules
that referenced
this pull request
Nov 27, 2026
## Rationale Make panoramapublic compile under the newly enforced Error Prone `StreamResourceLeak` check. ## Related Pull Requests - LabKey/server#1565 - LabKey/platform#8392 - LabKey/premiumModules#885 - LabKey/limsModules#2640 ## Changes - Close the file stream used to read the DIA-NN report header
labkey-jeckels
approved these changes
Nov 28, 2026
labkey-adam
added a commit
to LabKey/server
that referenced
this pull request
Nov 28, 2026
…s and leaked streams (#1565) ## Rationale Turn on Error Prone for every build and make unclosed `@MustBeClosed` resources and unclosed `Files` streams compile errors, so leaked result sets and file handles are caught at build time instead of in production. Error Prone was previously off by default, and both checks were configured only as warnings. ## Related Pull Requests - LabKey/platform#8392 - LabKey/premiumModules#885 - LabKey/limsModules#2640 - LabKey/MacCossLabModules#700 ## Changes - Enable Error Prone by default - Make `MustBeClosedChecker` and `StreamResourceLeak` errors; downgrade `CompileTimeConstant` to a warning - Add IntelliJ inspections that mirror both checks so violations show up in the editor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale
Make platform compile under the newly enforced Error Prone
MustBeClosedCheckerandStreamResourceLeakchecks.Related Pull Requests
Changes
@MustBeClosed