Add ability to execute FindBugs
[cfb.git] / prod / net / jaekl / cfb / db / Schema.java
index eef7b8ea15aad2e8272ccfb4d50afbb3850f7262..176526d9b649aaadcedd1c4f24a979b9e9eb7e00 100644 (file)
@@ -23,15 +23,16 @@ public class Schema {
        
        public boolean ensureDbInitialized(Connection con) throws SQLException {
                assert(null != con);
-               boolean result = true;
                
                if (allTablesPresent(con)) {
                        return true;
                }
                
-               result = createAllTables(con);
+               if (!createAllTables(con)) {
+                       return false;
+               }
                
-               return result;
+               return true;
        }
        
        boolean allTablesPresent(Connection con) throws SQLException 
@@ -56,6 +57,7 @@ public class Schema {
                }
                
                // We could be more thorough here, and check that the expected columns are in place.
+               // Also, eventually, some sort of DB schema versioning will be needed.
                
                return true;            
        }