Skip to content

Empty catch swallows exceptions in IpcNamedLock.tryUnlock() #1994

Description

@elharo

Affected version: HEAD

File: maven-resolver-named-locks-ipc/src/main/java/org/eclipse/aether/named/ipc/IpcNamedLock.java:108-115

private void tryUnlock(String contextId) {
    try {
        client.unlock(contextId);
    } catch (Exception e) {
        // Best-effort cleanup
    }
}

All exceptions from unlock() during timeout cleanup are silently discarded. While documented as intentional, this can mask real IO/connectivity issues.

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