Skip to content

org.jboss.forge.roaster.model.impl.JavaSourceImpl is not thread safe #258

@DavideRossi

Description

@DavideRossi

This is the issue: private static List<WildcardImportResolver> resolvers;
is used like a poor man's singleton so, when concurrent calls stat hitting getImportResolvers, sooner or later a concurrent modification exception is thrown.
The simpler solutions is to wrap the body of getImportResolvers in synchronized (JavaSourceImpl.class) {} block but I'm sure there are also more elegant fixes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions