Minor fix for ConcurrentModificationException
This commit is contained in:
parent
5ca59f6087
commit
eb53a9ce6d
|
@ -268,6 +268,16 @@ public class Module
|
|||
|
||||
private void init(BaseHome basehome)
|
||||
{
|
||||
parentNames = new HashSet<>();
|
||||
optionalParentNames = new HashSet<>();
|
||||
parentEdges = new HashSet<>();
|
||||
childEdges = new HashSet<>();
|
||||
xmls = new ArrayList<>();
|
||||
initialise = new ArrayList<>();
|
||||
libs = new ArrayList<>();
|
||||
files = new ArrayList<>();
|
||||
jvmArgs = new ArrayList<>();
|
||||
|
||||
String name = basehome.toShortForm(file);
|
||||
|
||||
// Find module system name (usually in the form of a filesystem reference)
|
||||
|
@ -279,16 +289,6 @@ public class Module
|
|||
}
|
||||
this.fileRef = mat.group(1).replace('\\','/');
|
||||
this.logicalName = this.fileRef;
|
||||
|
||||
parentNames = new HashSet<>();
|
||||
optionalParentNames = new HashSet<>();
|
||||
parentEdges = new HashSet<>();
|
||||
childEdges = new HashSet<>();
|
||||
xmls = new ArrayList<>();
|
||||
initialise = new ArrayList<>();
|
||||
libs = new ArrayList<>();
|
||||
files = new ArrayList<>();
|
||||
jvmArgs = new ArrayList<>();
|
||||
}
|
||||
|
||||
public boolean isEnabled()
|
||||
|
|
|
@ -375,7 +375,8 @@ public class Modules implements Iterable<Module>
|
|||
|
||||
public void registerParentsIfMissing(BaseHome basehome, StartArgs args, Module module) throws IOException
|
||||
{
|
||||
for (String name : new ArrayList<>(module.getParentNames()))
|
||||
Set<String> parents = new HashSet<>(module.getParentNames());
|
||||
for (String name : parents)
|
||||
{
|
||||
if (!modules.containsKey(name))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue