tcurdt 01/12/18 01:31:15 Modified: src/org/apache/cocoon/components/lucene SimpleCocoonCrawlerImpl.java Log: fixed a NullPointerException (the Logger is not initialized in constructor) and 3 regular expressions Revision Changes Path 1.2 +7 -4 xml-cocoon2/src/org/apache/cocoon/components/lucene/SimpleCocoonCrawlerImpl.java Index: SimpleCocoonCrawlerImpl.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/components/lucene/SimpleCocoonCrawlerImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- SimpleCocoonCrawlerImpl.java 2001/12/11 23:00:24 1.1 +++ SimpleCocoonCrawlerImpl.java 2001/12/18 09:31:15 1.2 @@ -79,6 +79,10 @@ public void configure( Configuration configuration ) throws ConfigurationException { + // TC: moved it here from the constructor. otherwise there is no logger + // and a NullPointerException is thrown + setImageExcludeFromCrawling(); + Configuration []children; children = configuration.getChildren( INCLUDE_CONFIG ); if (children != null) { @@ -167,14 +171,13 @@ public SimpleCocoonCrawlerImpl() { includeCrawlingURL = null; excludeCrawlingURL = new HashSet(); - setImageExcludeFromCrawling(); } private void setImageExcludeFromCrawling() { String []EXCLUDE_FROM_CRAWLING_DEFAULT = { - "*.\\.gif$", - "*.\\.png$", - "*.\\.jpe?g$" + ".*\\.gif$", + ".*\\.png$", + ".*\\.jpe?g$" }; for (int i = 0; i < EXCLUDE_FROM_CRAWLING_DEFAULT.length; i++ ) {
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]