Skip to content

Close Files.lines() stream in SpecLibValidator - #700

Merged
labkey-adam merged 1 commit into
developfrom
fb_enable_errorprone
Nov 27, 2026
Merged

labkey-adam merged 1 commit into
developfrom
fb_enable_errorprone

Conversation

@labkey-adam

@labkey-adam labkey-adam commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Rationale

Make panoramapublic compile under the newly enforced Error Prone StreamResourceLeak check.

Related Pull Requests

Changes

  • Close the file stream used to read the DIA-NN report header

@labkey-adam
labkey-adam merged commit 25b835a into develop Nov 27, 2026
7 of 8 checks passed
@labkey-adam
labkey-adam deleted the fb_enable_errorprone branch November 27, 2026 23:43
labkey-adam added a commit to LabKey/platform that referenced this pull request Nov 28, 2026
## Rationale
Make platform compile under the newly enforced Error Prone
`MustBeClosedChecker` and `StreamResourceLeak` checks.

## Related Pull Requests
- LabKey/server#1565
- LabKey/premiumModules#885
- LabKey/limsModules#2640
- LabKey/MacCossLabModules#700

## Changes
- Annotate methods that return result-set-backed streams with
`@MustBeClosed`
- Close streams that were left open
- Fix a variable-name typo in sample search indexing
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants