8153481: tools/jdeps/modules/GenModuleInfo.java and ModuleTest.java fails intermittently

Reviewed-by: dfuchs
This commit is contained in:
Mandy Chung 2016-05-19 10:55:33 -07:00
parent 07b326bd10
commit d027cbbffb
2 changed files with 3 additions and 8 deletions

View File

@ -33,6 +33,7 @@ import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.regex.Pattern;
import com.sun.tools.classfile.Dependency.Filter;
@ -561,13 +562,10 @@ public class Dependencies {
}
static abstract class BasicDependencyFinder implements Finder {
private Map<String,Location> locations = new HashMap<>();
private Map<String,Location> locations = new ConcurrentHashMap<>();
Location getLocation(String className) {
Location l = locations.get(className);
if (l == null)
locations.put(className, l = new SimpleLocation(className));
return l;
return locations.computeIfAbsent(className, cn -> new SimpleLocation(cn));
}
class Visitor implements ConstantPool.Visitor<Void,Void>, Type.Visitor<Void, Void> {

View File

@ -94,6 +94,3 @@ tools/sjavac/IncCompileWithChanges.java
#
# jdeps
tools/jdeps/modules/GenModuleInfo.java 8152502,8153481 generic-all fails to clean up files, java.util.HashMap$Node cannot be cast to java.util.HashMap$TreeNode
tools/jdeps/modules/ModuleTest.java 8153481 generic-all java.util.HashMap$Node cannot be cast to java.util.HashMap$TreeNode