Restructure database code.
[cfb.git] / prod / net / jaekl / cfb / CFB.java
index 28d2b1c698dc437113d58e1899596f4882fc32b6..f229ce1d7eae767674bfdb268ec9f377a55c4767 100644 (file)
@@ -152,19 +152,21 @@ public class CFB {
                if ( ! parseArgs(pw, args) ) {
                        return;
                }
+
+               File findBugsDir = getFindBugsDir();
+               File workDir = new File(".");
+               MessageMap messageMap = new MessageMap();
+               messageMap.load(findBugsDir, Locale.getDefault(Category.DISPLAY));
                
                try (Connection con = m_driver.connect(m_host, m_port, m_dbName, m_user, m_pass)) {
-                       m_schema.ensureDbInitialized(con);                      
+                       m_schema.setMessageMap(messageMap);
+                       m_schema.ensureDbInitialized(con);      
                }
                catch (SQLException exc) {
                        reportUnableToConnect(pw, exc);
                        return;
                }
                
-               File findBugsDir = getFindBugsDir();
-               File workDir = new File(".");
-               MessageMap messageMap = new MessageMap();
-               messageMap.load(findBugsDir, Locale.getDefault(Category.DISPLAY));
                Analyzer analyzer = new Analyzer(messageMap);
                Analysis analysis = analyzer.analyze(pw, workDir, m_fbp, m_buildNum);
                if (null == analysis) {