Make ClassFileNameHandler thread-safe

This commit is contained in:
Ben Gruver 2015-01-20 19:01:39 -08:00 committed by Connor Tumbleson
parent d9e5b0a487
commit 2312848efc

View File

@ -323,7 +323,7 @@ public class ClassFileNameHandler {
super(parent, logicalName); super(parent, logicalName);
} }
public FileSystemEntry addChild(FileSystemEntry entry) { public synchronized FileSystemEntry addChild(FileSystemEntry entry) {
String normalizedChildName = entry.getNormalizedName(false); String normalizedChildName = entry.getNormalizedName(false);
Collection<FileSystemEntry> entries = children.get(normalizedChildName); Collection<FileSystemEntry> entries = children.get(normalizedChildName);
if (entry instanceof DirectoryEntry) { if (entry instanceof DirectoryEntry) {