[Mulgara-svn] r1122 - in trunk/src/jar: store-nodepool-xa/java/org/mulgara/store/nodepool/xa store-stringpool-xa/java/org/mulgara/store/stringpool/xa

pag at mulgara.org pag at mulgara.org
Tue Aug 5 19:54:53 UTC 2008


Author: pag
Date: 2008-08-05 12:54:51 -0700 (Tue, 05 Aug 2008)
New Revision: 1122

Modified:
   trunk/src/jar/store-nodepool-xa/java/org/mulgara/store/nodepool/xa/XANodePoolFactory.java
   trunk/src/jar/store-stringpool-xa/java/org/mulgara/store/stringpool/xa/XAStringPoolFactory.java
Log:
Removed warnings. The warning on not using the logger was fixed by adding in a helpful error log.

Modified: trunk/src/jar/store-nodepool-xa/java/org/mulgara/store/nodepool/xa/XANodePoolFactory.java
===================================================================
--- trunk/src/jar/store-nodepool-xa/java/org/mulgara/store/nodepool/xa/XANodePoolFactory.java	2008-08-04 19:34:05 UTC (rev 1121)
+++ trunk/src/jar/store-nodepool-xa/java/org/mulgara/store/nodepool/xa/XANodePoolFactory.java	2008-08-05 19:54:51 UTC (rev 1122)
@@ -40,7 +40,6 @@
 import org.mulgara.store.nodepool.NodePool;
 import org.mulgara.store.nodepool.NodePoolException;
 import org.mulgara.store.nodepool.NodePoolFactory;
-import org.mulgara.store.xa.SimpleXAResourceException;
 
 /**
  * A {@link NodePoolFactory} that constructs {@link XANodePoolImpl}
@@ -86,8 +85,7 @@
    *
    * Use the {@link #newInstance} method to obtain instances.
    */
-  private XANodePoolFactory(String baseName)
-  {
+  private XANodePoolFactory(String baseName) {
     this.baseName = baseName;
   }
 
@@ -97,8 +95,8 @@
    * @param factoryInitializer  not used
    */
   static public NodePoolFactory newInstance(FactoryInitializer factoryInitializer)
-    throws InitializerException
-  {
+    throws InitializerException {
+
     //!!FIXME: getDirectory has the side effect of creating the directory if
     //         required.  this needs to be fixed!  Down with side effects!
     File directory = factoryInitializer.getDirectory();
@@ -124,8 +122,8 @@
     try {
       XANodePoolImpl xaNodePoolImpl = new XANodePoolImpl(baseName);
       return xaNodePoolImpl;
-    }
-    catch (IOException e) {
+    } catch (IOException e) {
+      logger.error("Couldn't construct node pool", e);
       throw new NodePoolException("Couldn't construct node pool", e);
     }
   }

Modified: trunk/src/jar/store-stringpool-xa/java/org/mulgara/store/stringpool/xa/XAStringPoolFactory.java
===================================================================
--- trunk/src/jar/store-stringpool-xa/java/org/mulgara/store/stringpool/xa/XAStringPoolFactory.java	2008-08-04 19:34:05 UTC (rev 1121)
+++ trunk/src/jar/store-stringpool-xa/java/org/mulgara/store/stringpool/xa/XAStringPoolFactory.java	2008-08-05 19:54:51 UTC (rev 1122)
@@ -40,7 +40,6 @@
 import org.mulgara.store.stringpool.StringPool;
 import org.mulgara.store.stringpool.StringPoolException;
 import org.mulgara.store.stringpool.StringPoolFactory;
-import org.mulgara.store.xa.SimpleXAResourceException;
 
 /**
  * A {@link StringPoolFactory} that constructs {@link XAStringPoolImpl}
@@ -122,9 +121,9 @@
     try {
       XAStringPoolImpl xaStringPoolImpl = new XAStringPoolImpl(baseName);
       return xaStringPoolImpl;
+    } catch (IOException e) {
+      logger.error("Couldn't construct string pool", e);
+      throw new StringPoolException("Couldn't construct string pool", e);
     }
-    catch (IOException e) {
-      throw new StringPoolException("Couldn't construct node pool", e);
-    }
   }
 }




More information about the Mulgara-svn mailing list