Revision: 3553
Author: [email protected]
Date: Tue May 25 09:44:45 2010
Log: FIXED - http://trillian.sqlpower.ca/bugzilla/show_bug.cgi?id=2808

Also fixed a deadlocking issue when copying multiple tables between projects.
http://code.google.com/p/power-architect/source/detail?r=3553

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

=======================================
--- /trunk/src/main/java/ca/sqlpower/architect/swingui/DBTree.java Thu May 13 13:10:22 2010 +++ /trunk/src/main/java/ca/sqlpower/architect/swingui/DBTree.java Tue May 25 09:44:45 2010
@@ -219,11 +219,11 @@
public boolean dbcsAlreadyExists(SPDataSource spec) throws SQLObjectException {
                SQLObject so = (SQLObject) getModel().getRoot();
// the children of the root, if they exists, are always SQLDatabase objects
-               Iterator it = so.getChildren().iterator();
+               Iterator<SQLDatabase> it = 
so.getChildren(SQLDatabase.class).iterator();
                boolean found = false;
                while (it.hasNext() && found == false) {
-                       SPDataSource dbcs = ((SQLDatabase) 
it.next()).getDataSource();
-                       if (spec==dbcs) {
+                       SPDataSource dbcs = it.next().getDataSource();
+                       if (dbcs.equals(spec)) {
                                found = true;
                        }
                }
@@ -239,12 +239,12 @@
public SQLDatabase getDatabase(SPDataSource spec) throws SQLObjectException {
            SQLObject so = (SQLObject) getModel().getRoot();
// the children of the root, if they exists, are always SQLDatabase objects
-        Iterator it = so.getChildren().iterator();
+ Iterator<SQLDatabase> it = so.getChildren(SQLDatabase.class).iterator();
         boolean found = false;
         while (it.hasNext() && found == false) {
             final SQLDatabase database = (SQLDatabase) it.next();
             SPDataSource dbcs = database.getDataSource();
-            if (spec==dbcs) {
+            if (dbcs.equals(spec)) {
                 return database;
             }
         }
=======================================
--- /trunk/src/main/java/ca/sqlpower/architect/swingui/LiquibaseOptionsPanel.java Sat May 22 09:31:01 2010 +++ /trunk/src/main/java/ca/sqlpower/architect/swingui/LiquibaseOptionsPanel.java Tue May 25 09:44:45 2010
@@ -18,8 +18,6 @@
  */
 package ca.sqlpower.architect.swingui;

-import ca.sqlpower.architect.ddl.LiquibaseDDLGenerator;
-import ca.sqlpower.swingui.DataEntryPanel;
 import javax.swing.JCheckBox;
 import javax.swing.JComponent;
 import javax.swing.JLabel;
@@ -27,7 +25,10 @@
 import javax.swing.JSpinner;
 import javax.swing.JTextField;
 import javax.swing.SpinnerNumberModel;
+
 import net.miginfocom.swing.MigLayout;
+import ca.sqlpower.architect.ddl.LiquibaseDDLGenerator;
+import ca.sqlpower.swingui.DataEntryPanel;

 /**
  *

Reply via email to