Minor code reorg in constructor

This commit is contained in:
hns 2005-03-24 18:20:39 +00:00
parent 73e377dde1
commit c5996c52ea

View file

@ -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