From c5996c52eaa91489e9cd233b1d90c5378ea08b9c Mon Sep 17 00:00:00 2001 From: hns Date: Thu, 24 Mar 2005 18:20:39 +0000 Subject: [PATCH] Minor code reorg in constructor --- src/helma/framework/core/Application.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/helma/framework/core/Application.java b/src/helma/framework/core/Application.java index fb73d582..93d4f798 100644 --- a/src/helma/framework/core/Application.java +++ b/src/helma/framework/core/Application.java @@ -197,14 +197,16 @@ public final class Application implements IPathElement, Runnable { throw new IllegalArgumentException("Invalid application name: " + name); } - this.name = name; - if (repositories.length > 0) { - this.repositories = new ArrayList(); - this.repositories.addAll(Arrays.asList(repositories)); - resourceComparator = new ResourceComparator(this); - } else { + if (repositories.length == 0) { 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; // system-wide properties, default to null