Skip to content

Resource Leaks in processing/app/Util.java#1436

Merged
catilac merged 4 commits intoprocessing:mainfrom
SalmaneKhalili:main
Feb 17, 2026
Merged

Resource Leaks in processing/app/Util.java#1436
catilac merged 4 commits intoprocessing:mainfrom
SalmaneKhalili:main

Conversation

@SalmaneKhalili
Copy link
Contributor

This PR add a simple implementation of what was suggested in #1432, at the moment it was only applied to unzip, i should be able to do the same for the rest of the methods mentioned in the issue, but id like to have feedback on the current way im going about it.

  • Added the test to gradle path
  • added the actual test.
  • added the solution

to put the test in the appropriate directory, id have to java files to
grade build configs, because it currently only checks for kotlin tests.
create a temp zip file > create a destination that is a file not a
directory (guaranteed exception) -> unzip throws ioexception because it
expects a directory not a file -> catch it -> check if the zip file is
still open -> if true == leak.
Copy link
Member

@tychedelia tychedelia left a comment

Choose a reason for hiding this comment

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

Looks good! We should just either gate or remove the test.

Copy link
Member

Choose a reason for hiding this comment

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

Probably better to not have a test than a platform specific test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

Ive also removed the test since its OS specific, and new code is
supposed to be in kotlin.
@catilac
Copy link
Collaborator

catilac commented Feb 17, 2026

Thanks y'all! Running the tests. I'll go ahead an approve it

@catilac catilac merged commit 05290b8 into processing:main Feb 17, 2026
6 checks passed
@catilac
Copy link
Collaborator

catilac commented Feb 17, 2026

@all-contributors please add @SalmaneKhalili for bug-finding, and bug-fixing

@allcontributors
Copy link
Contributor

@catilac

I've put up a pull request to add @SalmaneKhalili! 🎉

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.

3 participants