diff --git a/src/main/java/helma/framework/core/Prototype.java b/src/main/java/helma/framework/core/Prototype.java index 30b67516..022cf05d 100644 --- a/src/main/java/helma/framework/core/Prototype.java +++ b/src/main/java/helma/framework/core/Prototype.java @@ -415,6 +415,11 @@ public final class Prototype { * @return an iterator of this prototype's code resources */ public synchronized Iterator getCodeResources() { + // if code has never been updated, do so now before returning an empty or incomplete list + if (lastCodeUpdate == 0) { + checkForUpdates(); + } + // we copy over to a new list, because the underlying set may grow // during compilation through use of app.addRepository() return new ArrayList(code).iterator();