Revision: 3162
Author: mo.jeff
Date: Mon Nov 16 11:23:52 2009
Log: Fixed a Findbug warning in which StatementType.equals() does not check for null values. (Nor does it check if the given value is of type StatementType)
http://code.google.com/p/power-architect/source/detail?r=3162

Modified:
 /trunk/src/ca/sqlpower/architect/ddl/DDLStatement.java

=======================================
--- /trunk/src/ca/sqlpower/architect/ddl/DDLStatement.java Fri May 22 06:08:44 2009 +++ /trunk/src/ca/sqlpower/architect/ddl/DDLStatement.java Mon Nov 16 11:23:52 2009
@@ -47,6 +47,9 @@
                }

                public boolean equals(Object other) {
+                   if (!(other instanceof StatementType)) {
+                       return false;
+                   }
                        return this.type.equals(((StatementType) other).type);
                }

Reply via email to