Skip to content

Concurrency issue when comparing MediaType#parameters #1243

@thboileau

Description

@thboileau

Encountered Deadlock in the org.restlet.data.MediaType class while comparing the parameters:
https://github.com/restlet/restlet-framework-java/blob/2.3/modules/org.restlet/src/org/restlet/data/MediaType.java#L965

Noticed that two threads where comparing the two same media types but in distinct order. The deadlock is caused by the fact that WrapperList relies on the Vector class and that each thread locks one list of parameters and wait for the other when comparing it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions