cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/components/saxconnector XIncludeSAXConnector.java
Date Thu, 26 Apr 2001 19:24:58 GMT
bloritsch    01/04/26 12:24:58

  Modified:    src/org/apache/cocoon/components/saxconnector Tag:
                        xml-cocoon2 XIncludeSAXConnector.java
  Log:
  Fix for the dreaded NullPointerException
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.8   +7 -3      xml-cocoon/src/org/apache/cocoon/components/saxconnector/Attic/XIncludeSAXConnector.java
  
  Index: XIncludeSAXConnector.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/saxconnector/Attic/XIncludeSAXConnector.java,v
  retrieving revision 1.1.2.7
  retrieving revision 1.1.2.8
  diff -u -r1.1.2.7 -r1.1.2.8
  --- XIncludeSAXConnector.java	2001/04/25 17:06:41	1.1.2.7
  +++ XIncludeSAXConnector.java	2001/04/26 19:24:57	1.1.2.8
  @@ -41,7 +41,7 @@
   /**
    * Copy of code from XIncludeTransformer as a starting point for XIncludeSAXConnector.
    * @author <a href="dims@yahoo.com">Davanum Srinivas</a>
  - * @version CVS $Revision: 1.1.2.7 $ $Date: 2001/04/25 17:06:41 $
  + * @version CVS $Revision: 1.1.2.8 $ $Date: 2001/04/26 19:24:57 $
    */
   public class XIncludeSAXConnector extends AbstractXMLPipe implements Composable, Recyclable,
SAXConnector, Disposable {
   
  @@ -159,6 +159,10 @@
           Sitemap sitemap = null;
           EventPipeline eventPipeline = null;
           StreamPipeline pipeline = null;
  +        if (element == null) element="";
  +        if (ns == null) ns="";
  +        if (prefix == null) prefix="";
  +
           try {
               selector = (ComponentSelector) manager.lookup(Roles.SERVERPAGES);
               sitemap = (Sitemap) selector.select("sitemap");
  @@ -174,7 +178,7 @@
   
               IncludeXMLConsumer consumer = new IncludeXMLConsumer(this);
   
  -            if (!element.equals(""))
  +            if (!"".equals(element))
                   this.startElem(ns, prefix, element);
   
               ((XMLProducer)eventPipeline).setConsumer(consumer);
  @@ -184,7 +188,7 @@
               eventPipeline.process(this.environment);
               this.environment.popURI();
   
  -            if (!element.equals(""))
  +            if (!"".equals(element))
                   this.endElem(prefix, element);
           } catch (Exception e) {
               getLogger().error("Error selecting sitemap",e);
  
  
  

----------------------------------------------------------------------
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