Skip to content

Close leaked Reader in metadata cache read path#436

Merged
goneall merged 1 commit into
spdx:masterfrom
bact:fix/download-cache-default-encoding
Jul 19, 2026
Merged

Close leaked Reader in metadata cache read path#436
goneall merged 1 commit into
spdx:masterfrom
bact:fix/download-cache-default-encoding

Conversation

@bact

@bact bact commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator
  • DownloadCache.readMetadataFile opened a Reader (FileReader/BufferedReader) that was never closed. Fix by use the same pattern as writeMetadataFile
  • Also fixes SpotBugs DM_DEFAULT_ENCODING (see Add SpotBugs analysis check #434) on both read and write. Use explicit UTF-8 instead of the JVM's platform-default charset.

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@bact bact added the bug Something isn't working label Jul 18, 2026

@goneall goneall left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@goneall
goneall merged commit 40b3033 into spdx:master Jul 19, 2026
1 check passed
@bact
bact deleted the fix/download-cache-default-encoding branch July 19, 2026 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants