Minor code reorg in constructor
This commit is contained in:
parent
73e377dde1
commit
c5996c52ea
1 changed files with 8 additions and 6 deletions
|
@ -197,14 +197,16 @@ public final class Application implements IPathElement, Runnable {
|
||||||
throw new IllegalArgumentException("Invalid application name: " + name);
|
throw new IllegalArgumentException("Invalid application name: " + name);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.name = name;
|
if (repositories.length == 0) {
|
||||||
if (repositories.length > 0) {
|
|
||||||
this.repositories = new ArrayList();
|
|
||||||
this.repositories.addAll(Arrays.asList(repositories));
|
|
||||||
resourceComparator = new ResourceComparator(this);
|
|
||||||
} else {
|
|
||||||
throw new java.lang.IllegalArgumentException("No sources defined for application: " + name);
|
throw new java.lang.IllegalArgumentException("No sources defined for application: " + name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.name = name;
|
||||||
|
|
||||||
|
this.repositories = new ArrayList();
|
||||||
|
this.repositories.addAll(Arrays.asList(repositories));
|
||||||
|
resourceComparator = new ResourceComparator(this);
|
||||||
|
|
||||||
dbDir = customDbDir;
|
dbDir = customDbDir;
|
||||||
|
|
||||||
// system-wide properties, default to null
|
// system-wide properties, default to null
|
||||||
|
|
Loading…
Add table
Reference in a new issue