vgritsenko    02/01/11 18:00:10

  Modified:    src/java/org/apache/cocoon Main.java
  Log:
  Fix NPE when trying to build docs
  
  Revision  Changes    Path
  1.11      +7 -5      xml-cocoon2/src/java/org/apache/cocoon/Main.java
  
  Index: Main.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/Main.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Main.java 11 Jan 2002 19:58:39 -0000      1.10
  +++ Main.java 12 Jan 2002 02:00:10 -0000      1.11
  @@ -99,7 +99,7 @@
    * Command line entry point.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.10 $ $Date: 2002/01/11 19:58:39 $
  + * @version CVS $Revision: 1.11 $ $Date: 2002/01/12 02:00:10 $
    */
   public class Main {
   
  @@ -531,10 +531,12 @@
           this.cocoon = cocoon;
           this.context = context;
           this.destDir = destDir;
  -        try {
  -            this.brokenLinkWriter = new PrintWriter(new FileWriter(brokenLinks), 
true);
  -        } catch (IOException ioe) {
  -            log.error("File does not exist: " + brokenLinks.getAbsolutePath());
  +        if (brokenLinks != null) {
  +            try {
  +                this.brokenLinkWriter = new PrintWriter(new 
FileWriter(brokenLinks), true);
  +            } catch (IOException ioe) {
  +                log.error("File does not exist: " + brokenLinks.getAbsolutePath());
  +            }
           }
           this.attributes = new HashMap();
           this.empty = new HashMap();
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to