Skip to content

CachingParser is not thread safe #41

Description

@gysel

The class CachingParser uses a org.apache.commons.collections4.map.LRUMap internally.

The JavaDoc clearly states:

Note that LRUMap is not synchronized and is not thread-safe. If you wish to use this map from multiple threads concurrently, you must use appropriate synchronization. The simplest approach is to wrap this map using Collections.synchronizedMap(Map). This class may throw NullPointerException's when accessed by concurrent threads.

I think it would be good to add a lock directly in the CachingParser.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions