- for (ModuleBuilder mb : builders) {
- String fromName = mb.getName();
- Date fromRevision = mb.getRevision() == null ? DEFAULT_REVISION
- : mb.getRevision();
- for (ModuleImport imprt : mb.getModuleImports()) {
+ for (Object mb : builders) {
+
+ String fromName = null;
+ Date fromRevision = null;
+ Set<ModuleImport> imports = null;
+
+ if (mb instanceof Module) {
+ fromName = ((Module) mb).getName();
+ fromRevision = ((Module) mb).getRevision();
+ imports = ((Module) mb).getImports();
+ } else if (mb instanceof ModuleBuilder) {
+ fromName = ((ModuleBuilder) mb).getName();
+ fromRevision = ((ModuleBuilder) mb).getRevision();
+ imports = ((ModuleBuilder) mb).getModuleImports();
+ }
+ // no need to check if other Type of object, check is performed in
+ // process modules
+
+ if (fromRevision == null)
+ fromRevision = DEFAULT_REVISION;
+
+ for (ModuleImport imprt : imports) {