maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r704515 - in /maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck: LinkMatcher.java validation/LinkValidatorManager.java
Date Tue, 14 Oct 2008 12:30:43 GMT
Author: vsiveton
Date: Tue Oct 14 05:30:42 2008
New Revision: 704515

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

Modified:
    maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/LinkMatcher.java
    maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/validation/LinkValidatorManager.java

Modified: maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/LinkMatcher.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/LinkMatcher.java?rev=704515&r1=704514&r2=704515&view=diff
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/LinkMatcher.java
(original)
+++ maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/LinkMatcher.java
Tue Oct 14 05:30:42 2008
@@ -29,6 +29,8 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.codehaus.plexus.util.IOUtil;
+
 /**
  * Link matcher. Reads the contents of a file and tries to match the following: <code>
  * <a href=""....
@@ -42,7 +44,6 @@
  */
 class LinkMatcher
 {
-
     /** Regexp for link matching. */
     private static final Pattern MATCH_PATTERN =
         Pattern.compile( "<(?>link|a|img|script)[^>]*?(?>href|src)\\s*?=\\s*?[\\\"'](.*?)[\\\"'][^>]*?",
@@ -83,7 +84,7 @@
         }
         finally
         {
-            reader.close();
+            IOUtil.close( reader );
         }
 
         return pageBuffer;

Modified: maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/validation/LinkValidatorManager.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/validation/LinkValidatorManager.java?rev=704515&r1=704514&r2=704515&view=diff
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/validation/LinkValidatorManager.java
(original)
+++ maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/validation/LinkValidatorManager.java
Tue Oct 14 05:30:42 2008
@@ -22,6 +22,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.maven.doxia.linkcheck.model.LinkcheckFileResult;
+import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.SelectorUtils;
 import org.codehaus.plexus.util.StringUtils;
 
@@ -227,16 +228,7 @@
         }
         finally
         {
-            try
-            {
-                is.close();
-            }
-            catch ( IOException e )
-            {
-                LOG.debug( "Unable to close stream!", e );
-
-                is = null;
-            }
+            IOUtil.close( is );
         }
     }
 
@@ -308,16 +300,7 @@
 
             dir = null;
 
-            try
-            {
-                os.close();
-            }
-            catch ( IOException e )
-            {
-                LOG.debug( "Unable to close stream!", e );
-
-                os = null;
-            }
+            IOUtil.close( os );
         }
     }
 



Mime
View raw message