cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/components/search SimpleLuceneXMLIndexerImpl.java
Date Mon, 22 Jul 2002 22:55:43 GMT
vgritsenko    2002/07/22 15:55:43

  Modified:    src/java/org/apache/cocoon/components/search Tag:
                        cocoon_2_0_3_branch SimpleLuceneXMLIndexerImpl.java
  Log:
  fix NPE, thanks to Kristian <m.kristian@gmx.net>
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.9.2.1   +6 -4      xml-cocoon2/src/java/org/apache/cocoon/components/search/SimpleLuceneXMLIndexerImpl.java
  
  Index: SimpleLuceneXMLIndexerImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/search/SimpleLuceneXMLIndexerImpl.java,v
  retrieving revision 1.9
  retrieving revision 1.9.2.1
  diff -u -r1.9 -r1.9.2.1
  --- SimpleLuceneXMLIndexerImpl.java	28 Feb 2002 14:11:42 -0000	1.9
  +++ SimpleLuceneXMLIndexerImpl.java	22 Jul 2002 22:55:43 -0000	1.9.2.1
  @@ -176,9 +176,11 @@
               URLConnection contentURLConnection = contentURL.openConnection();
               String contentType = contentURLConnection.getContentType();
   
  -            int index = contentType.indexOf(';');
  -            if (contentType != null && index != -1) {
  -                contentType = contentType.substring(0, index);
  +            if (contentType != null) { 
  +                int index = contentType.indexOf(';');
  +                if (index != -1) {
  +                    contentType = contentType.substring(0, index);
  +                }
               }
   
               if (contentType != null &&
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message