66import java .nio .file .Files ;
77import java .nio .file .Path ;
88import java .util .Collection ;
9- import java .util .Collections ;
10- import java .util .HashMap ;
119import java .util .List ;
1210import java .util .Map ;
1311import java .util .Objects ;
1412import java .util .Optional ;
1513import java .util .Set ;
1614import java .util .concurrent .CompletableFuture ;
15+ import java .util .concurrent .ConcurrentHashMap ;
1716import java .util .concurrent .ExecutorService ;
1817import java .util .concurrent .Executors ;
1918import java .util .concurrent .atomic .AtomicInteger ;
4645import net .sourceforge .pmd .reporting .Report ;
4746import software .xdev .pmd .config .PluginConfiguration ;
4847import software .xdev .pmd .config .PluginConfigurationManager ;
49- import software .xdev .pmd .external .org .apache . shiro . lang . util .SoftHashMap ;
48+ import software .xdev .pmd .external .org .springframework . util .ConcurrentReferenceHashMap ;
5049import software .xdev .pmd .langversion .ManagedLanguageVersionResolver ;
5150import software .xdev .pmd .model .config .ConfigurationLocation ;
5251
@@ -61,11 +60,11 @@ public class PMDAnalyzer implements Disposable
6160
6261 private final Project project ;
6362
64- private final Map <Optional <Module >, ReentrantLock > locks = Collections . synchronizedMap ( new HashMap <>() );
65- private final Map <Optional <Module >, CacheFile > cacheFiles = Collections . synchronizedMap ( new HashMap <>() );
63+ private final Map <Optional <Module >, ReentrantLock > locks = new ConcurrentHashMap <>();
64+ private final Map <Optional <Module >, CacheFile > cacheFiles = new ConcurrentHashMap <>();
6665 // Reuse classloader when path is the same
6766 private final Map <Set <String >, ClassLoader > cachedSdkLibAuxClassLoader =
68- Collections . synchronizedMap ( new SoftHashMap <>() );
67+ new ConcurrentReferenceHashMap <>();
6968
7069 public PMDAnalyzer (final Project project )
7170 {
0 commit comments