-
Notifications
You must be signed in to change notification settings - Fork 398
Open
Description
Title
Fix Resource Leaks Using Try-With-Resources
Description
Some files in the JPF codebase don’t properly close streams like FileInputStream and BufferedReader, which can cause file handle exhaustion and memory leaks. These should use Java’s try-with-resources pattern instead of manual close calls.
Affected Files
JPF_java_lang_System.javaLogConsole.javaRepositoryEntry.javaConfig.javaJPFSiteUtils.java
Example
Current
FileInputStream fis = new FileInputStream(cf);
p.load(fis);Fix
try (FileInputStream fis = new FileInputStream(cf)) {
p.load(fis);
}Acceptance Criteria
- All unclosed resources use try-with-resources
- No manual
.close()calls remain - All tests pass
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels