You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by mi...@apache.org on 2003/11/13 23:57:28 UTC

cvs commit: cocoon-lenya/src/java/org/apache/lenya/lucene/parser HTMLParserFactory.java

michi       2003/11/13 14:57:28

  Modified:    src/java/org/apache/lenya/lucene/parser
                        HTMLParserFactory.java
  Log:
  NullPointerException fixed
  
  Revision  Changes    Path
  1.6       +5 -3      cocoon-lenya/src/java/org/apache/lenya/lucene/parser/HTMLParserFactory.java
  
  Index: HTMLParserFactory.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/lucene/parser/HTMLParserFactory.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- HTMLParserFactory.java	23 Jul 2003 13:21:21 -0000	1.5
  +++ HTMLParserFactory.java	13 Nov 2003 22:57:28 -0000	1.6
  @@ -79,10 +79,12 @@
           // PDF files
           else if (file.getName().endsWith(".txt")) {
               parser = new PDFParserWrapper();
  +        } else {
  +            parser = new SwingHTMLParser();
  +            new CommandLineLogger(HTMLParserFactory.class).debug(".newInstance(): WARNING: Suffix did no match (" + file.getName()  + "). SwingHTMLParser as default parser selected!");
           }
   
  -        new CommandLineLogger(HTMLParserFactory.class).debug("returning a " +
  -            parser.getClass().getName() + " for " + file.getName());
  +        new CommandLineLogger(HTMLParserFactory.class).debug("returning a " + parser.getClass().getName() + " for " + file.getName());
   
           return parser;
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org