maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r724324 - in /maven/doxia/doxia/trunk/doxia-modules: doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptReaderSource.java doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoUtils.java
Date Mon, 08 Dec 2008 11:58:11 GMT
Author: vsiveton
Date: Mon Dec  8 03:58:11 2008
New Revision: 724324

URL: http://svn.apache.org/viewvc?rev=724324&view=rev
Log:
o using IOUtil.close()

Modified:
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptReaderSource.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoUtils.java

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptReaderSource.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptReaderSource.java?rev=724324&r1=724323&r2=724324&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptReaderSource.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptReaderSource.java
Mon Dec  8 03:58:11 2008
@@ -23,6 +23,8 @@
 import java.io.LineNumberReader;
 import java.io.Reader;
 
+import org.codehaus.plexus.util.IOUtil;
+
 /** Reader for apt source documents. */
 public class AptReaderSource
     implements AptSource
@@ -93,17 +95,7 @@
     /** Closes the reader associated with this AptReaderSource. */
     public void close()
     {
-        if ( reader != null )
-        {
-            try
-            {
-                reader.close();
-            }
-            catch ( IOException ignored )
-            {
-                // TODO: log
-            }
-        }
+        IOUtil.close( reader );
         reader = null;
     }
 }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoUtils.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoUtils.java?rev=724324&r1=724323&r2=724324&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoUtils.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoUtils.java
Mon Dec  8 03:58:11 2008
@@ -39,6 +39,7 @@
 import org.apache.fop.apps.Fop;
 import org.apache.fop.apps.FopFactory;
 import org.apache.fop.apps.MimeConstants;
+import org.codehaus.plexus.util.IOUtil;
 
 /**
  * <code>FO Sink</code> utilities.
@@ -62,7 +63,6 @@
     public static void convertFO2PDF( File fo, File pdf, String resourceDir )
         throws TransformerException
     {
-
         FopFactory fopFactory = FopFactory.newInstance();
 
         FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
@@ -108,14 +108,7 @@
         }
         finally
         {
-            try
-            {
-                out.close();
-            }
-            catch ( IOException e )
-            {
-                e.printStackTrace();
-            }
+            IOUtil.close( out );
         }
     }
 



Mime
View raw message