Fixed MPLINKCHECK-15. Use BufferedInputStream in FileToCheck
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@115974 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
ef5b83bf36
commit
6d5c248cf9
2 files changed
+6
-4
No files matched your search
@@ -17,6 +17,7 @@ package org.apache.maven.linkcheck;
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
@@ -42,7 +43,7 @@ import org.w3c.tidy.Tidy;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:bwalding@apache.org">Ben Walding</a>
|
||||
* @version $Id: FileToCheck.java,v 1.17 2004/08/01 22:23:33 carlos Exp $
|
||||
* @version $Id: FileToCheck.java,v 1.18 2004/08/17 17:14:35 carlos Exp $
|
||||
*/
|
||||
public class FileToCheck
|
||||
{
|
||||
@@ -146,13 +147,13 @@ public class FileToCheck
|
||||
{
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
PrintWriter errOut = new PrintWriter(baos);
|
||||
FileInputStream in = new FileInputStream(fileToCheck);
|
||||
BufferedInputStream bin = new BufferedInputStream(new FileInputStream(fileToCheck));
|
||||
try
|
||||
{
|
||||
Tidy tidy = getTidy();
|
||||
tidy.setErrout(errOut);
|
||||
LOG.debug("Processing:" + fileToCheck);
|
||||
org.w3c.dom.Document domDocument = tidy.parseDOM(in, null);
|
||||
org.w3c.dom.Document domDocument = tidy.parseDOM(bin, null);
|
||||
|
||||
// now read a dom4j document from
|
||||
// JTidy's W3C DOM object
|
||||
@@ -165,7 +166,7 @@ public class FileToCheck
|
||||
}
|
||||
finally
|
||||
{
|
||||
close(in);
|
||||
close(bin);
|
||||
close(baos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
</properties>
|
||||
<body>
|
||||
<release version="1.4-SNAPSHOT" date="in CVS">
|
||||
<action dev="carlos" type="fix" issue="MPLINKCHECK-15" due-to="Stephane Mikaty">Use BufferedInputStream in FileToCheck</action>
|
||||
<action dev="carlos" type="fix">Set links as invalid on unknown errors</action>
|
||||
<action dev="carlos" type="fix" issue="MPLINKCHECK-8">Use CDATA in file name</action>
|
||||
<action dev="carlos" type="add">Added <code>maven.linkcheck.exclude</code> property</action>
|
||||
|
||||
Reference in new issue
Block a user