kevinross 2003/07/17 07:33:20
Modified: java/src/org/apache/xindice/client/xmldb/embed DatabaseImpl.java Log: perusing...remove unnecessary log checks, format, and org imports Revision Changes Path 1.12 +11 -19 xml-xindice/java/src/org/apache/xindice/client/xmldb/embed/DatabaseImpl.java Index: DatabaseImpl.java =================================================================== RCS file: /home/cvs/xml-xindice/java/src/org/apache/xindice/client/xmldb/embed/DatabaseImpl.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- DatabaseImpl.java 14 Jul 2003 19:07:16 -0000 1.11 +++ DatabaseImpl.java 17 Jul 2003 14:33:20 -0000 1.12 @@ -58,6 +58,12 @@ */ package org.apache.xindice.client.xmldb.embed; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.apache.xindice.client.xmldb.CommonConfigurable; import org.apache.xindice.core.Database; import org.apache.xindice.server.Xindice; @@ -65,18 +71,10 @@ import org.apache.xindice.util.ReadOnlyException; import org.apache.xindice.util.XindiceException; import org.apache.xindice.xml.dom.DOMParser; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - import org.xmldb.api.base.Collection; import org.xmldb.api.base.ErrorCodes; import org.xmldb.api.base.XMLDBException; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; - /** * implements XML:DB's <code>Database</code> interface providing * embedded access to a Xindice database. @@ -113,10 +111,9 @@ if (null == this.database) { log.fatal("Unable to configure database"); - throw new XindiceException("Unable to configure database"); } - else if (log.isInfoEnabled()) { + else { log.info("Database name: '" + this.database.getName() + "'"); } } @@ -125,17 +122,13 @@ Configuration config; String configFile = System.getProperty(Xindice.PROP_XINDICE_CONFIGURATION); if (configFile != null && !configFile.equals("")) { - if (log.isInfoEnabled()) { - log.info("Specified configuration file: '" + configFile + "'"); - } - FileInputStream configXMLFile = new FileInputStream(new File(configFile)); + log.info("Specified configuration file: '" + configFile + "'"); + FileInputStream configXMLFile = new FileInputStream(new File(configFile)); config = new Configuration(DOMParser.toDocument(configXMLFile), false); } else { - if (log.isInfoEnabled()) { - log.info("No configuration file specified, going with the default configuration"); - } + log.info("No configuration file specified, going with the default configuration"); config = new Configuration(DOMParser.toDocument(Xindice.DEFAULT_CONFIGURATION), false); } @@ -265,5 +258,4 @@ public String getConformanceLevel() throws XMLDBException { return CONFORMANCE_LEVEL; } - }