Skip to content

Leaky stream handling in test utilities (TestFileUtils, TestFileProcessor) #1998

Description

@elharo

Affected version: HEAD

Files:

  • maven-resolver-test-util/src/main/java/org/eclipse/aether/internal/test/util/TestFileUtils.java:172-325
  • maven-resolver-test-util/src/main/java/org/eclipse/aether/internal/test/util/TestFileProcessor.java:63-151

Methods manually close streams in try-catch-finally blocks instead of using try-with-resources. If an explicit close() call throws before the finally block, open resources are leaked. Functionally correct in happy-path but fragile.

Originally reported in #1944.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:minorMinor loss of function, or other problem where easy workaround is present

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions