carlos      2004/08/17 10:14:36

  Modified:    linkcheck/src/main/org/apache/maven/linkcheck
                        FileToCheck.java
               linkcheck/xdocs changes.xml
  Log:
  Fixed MPLINKCHECK-15. Use BufferedInputStream in FileToCheck
  
  Revision  Changes    Path
  1.18      +5 -4      
maven-plugins/linkcheck/src/main/org/apache/maven/linkcheck/FileToCheck.java
  
  Index: FileToCheck.java
  ===================================================================
  RCS file: 
/home/cvs/maven-plugins/linkcheck/src/main/org/apache/maven/linkcheck/FileToCheck.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- FileToCheck.java  1 Aug 2004 22:23:33 -0000       1.17
  +++ FileToCheck.java  17 Aug 2004 17:14:35 -0000      1.18
  @@ -17,6 +17,7 @@
    * ====================================================================
    */
   
  +import java.io.BufferedInputStream;
   import java.io.ByteArrayOutputStream;
   import java.io.File;
   import java.io.FileInputStream;
  @@ -146,13 +147,13 @@
       {
           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 @@
           }
           finally
           {
  -            close(in);
  +            close(bin);
               close(baos);
           }
       }
  
  
  
  1.24      +1 -0      maven-plugins/linkcheck/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/linkcheck/xdocs/changes.xml,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- changes.xml       1 Aug 2004 22:28:14 -0000       1.23
  +++ changes.xml       17 Aug 2004 17:14:35 -0000      1.24
  @@ -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>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to