java/sql-dk/src/info/globalcode/sql/dk/InfoLister.java
branchv_0
changeset 75 43aa4625ab7e
parent 74 a8444f6a54f3
child 89 98d18e9a357b
--- a/java/sql-dk/src/info/globalcode/sql/dk/InfoLister.java	Thu Dec 26 22:39:38 2013 +0100
+++ b/java/sql-dk/src/info/globalcode/sql/dk/InfoLister.java	Fri Dec 27 00:57:34 2013 +0100
@@ -154,16 +154,12 @@
 
 		try {
 			DatabaseDefinition dd = configurationProvider.getConfiguration().getDatabase(dbName);
-			if (dd == null) {
-				log.log(Level.FINE, "No database with this name is configured: {0}", dbName);
-			} else {
-				log.log(Level.FINE, "Database definition was loaded from configuration");
-				succesfullyConfigured = true;
-				try (DatabaseConnection dc = dd.connect()) {
-					succesfullyConnected = dc.test();
-				}
-				log.log(Level.FINE, "Database connection test was successful");
+			log.log(Level.FINE, "Database definition was loaded from configuration");
+			succesfullyConfigured = true;
+			try (DatabaseConnection dc = dd.connect()) {
+				succesfullyConnected = dc.test();
 			}
+			log.log(Level.FINE, "Database connection test was successful");
 		} catch (ConfigurationException | SQLException e) {
 			log.log(Level.SEVERE, "Error during testing connection", e);
 		}