Revision: 3882
Author: [email protected]
Date: Fri Aug 13 09:24:17 2010
Log: Fixed DBTree's getDatabaseList method to do an instanceof check for all of the children it is iterating over. Not all children of the model have to be SQLDatabases.
http://code.google.com/p/power-architect/source/detail?r=3882

Modified:
 /trunk/src/main/java/ca/sqlpower/architect/swingui/DBTree.java

=======================================
--- /trunk/src/main/java/ca/sqlpower/architect/swingui/DBTree.java Wed Aug 11 11:38:32 2010 +++ /trunk/src/main/java/ca/sqlpower/architect/swingui/DBTree.java Fri Aug 13 09:24:17 2010
@@ -208,7 +208,10 @@
                TreeModel m = getModel();
                int dbCount = m.getChildCount(m.getRoot());
                for (int i = 0; i < dbCount; i++) {
-                       databases.add((SQLDatabase) m.getChild(m.getRoot(), i));
+                       Object child = m.getChild(m.getRoot(), i);
+                       if (child instanceof SQLDatabase) {
+                           databases.add((SQLDatabase) child);
+                       }
                }
                return databases;
        }

Reply via email to