FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Resource Leaks in processing/app/Util.java by SalmaneKhalili · Pull Request #1436 · processing/processing4 · GitHub

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

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

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

Conversation

Copy link
Copy Markdown
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.

tychedelia 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

Comment thread app/test/processing/app/UtilTest.java Outdated

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Done!

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

catilac commented Feb 17, 2026

Copy link
Copy Markdown
Collaborator

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

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

catilac commented Feb 17, 2026

Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Contributor

@catilac

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL