Skip to content

Non-thread-safe access in synchronized Results class in DependencyCollectorDelegate #1995

Description

@elharo

Affected version: HEAD

File: maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DependencyCollectorDelegate.java:571-598

addException() and addCycle() are synchronized on Results, but they call result.getExceptions() and result.getCycles() on a CollectResult that may not be thread-safe. If CollectResult's internal collections are not synchronized or safely published, concurrent modifications may not be visible.

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