1.1 --- a/java/sql-dk/src/info/globalcode/sql/dk/InfoLister.java Thu Dec 26 22:39:38 2013 +0100
1.2 +++ b/java/sql-dk/src/info/globalcode/sql/dk/InfoLister.java Fri Dec 27 00:57:34 2013 +0100
1.3 @@ -154,16 +154,12 @@
1.4
1.5 try {
1.6 DatabaseDefinition dd = configurationProvider.getConfiguration().getDatabase(dbName);
1.7 - if (dd == null) {
1.8 - log.log(Level.FINE, "No database with this name is configured: {0}", dbName);
1.9 - } else {
1.10 - log.log(Level.FINE, "Database definition was loaded from configuration");
1.11 - succesfullyConfigured = true;
1.12 - try (DatabaseConnection dc = dd.connect()) {
1.13 - succesfullyConnected = dc.test();
1.14 - }
1.15 - log.log(Level.FINE, "Database connection test was successful");
1.16 + log.log(Level.FINE, "Database definition was loaded from configuration");
1.17 + succesfullyConfigured = true;
1.18 + try (DatabaseConnection dc = dd.connect()) {
1.19 + succesfullyConnected = dc.test();
1.20 }
1.21 + log.log(Level.FINE, "Database connection test was successful");
1.22 } catch (ConfigurationException | SQLException e) {
1.23 log.log(Level.SEVERE, "Error during testing connection", e);
1.24 }