mbien commented on code in PR #7989:
URL: https://github.com/apache/netbeans/pull/7989#discussion_r1857478109
##########
apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/Evaluator.java:
##########
@@ -889,7 +890,11 @@ private String mergePaths(Set<String> cnbs, boolean
test,String testtype,File te
return cps.toString();
}
- private static final Map<String, String> limitModulesCache = new
HashMap<>();
+ /**
+ * cache shared between Evaluator instances.
+ */
+ private static final Map<String, String> limitModulesCache = new
ConcurrentHashMap<>();
+
private static String getLimitModules(String javacRelease) {
return limitModulesCache.computeIfAbsent(javacRelease, release -> {
Review Comment:
on second thought: this probably could be a plain old synchronized map? The
keys are javac release versions, so it won't use the per-item lock feature of
the CMH very often.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists