You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by vg...@apache.org on 2002/02/11 19:49:14 UTC

cvs commit: xml-cocoon2/src/java/org/apache/cocoon/serialization AbstractTextSerializer.java

vgritsenko    02/02/11 10:49:14

  Modified:    src/java/org/apache/cocoon/serialization
                        AbstractTextSerializer.java
  Log:
  Fix NPE reported by Thomas Nappez [cto@natika.com]
  
  Revision  Changes    Path
  1.7       +3 -2      xml-cocoon2/src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java
  
  Index: AbstractTextSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AbstractTextSerializer.java	4 Feb 2002 13:51:27 -0000	1.6
  +++ AbstractTextSerializer.java	11 Feb 2002 18:49:14 -0000	1.7
  @@ -90,7 +90,7 @@
    *         (Apache Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
    * @author <a href="mailto:sylvain.wallez@anyware-tech.com">Sylvain Wallez</a>
  - * @version CVS $Id: AbstractTextSerializer.java,v 1.6 2002/02/04 13:51:27 cziegeler Exp $
  + * @version CVS $Id: AbstractTextSerializer.java,v 1.7 2002/02/11 18:49:14 vgritsenko Exp $
    */
   public abstract class AbstractTextSerializer
   extends AbstractSerializer
  @@ -378,7 +378,8 @@
             throws SAXException {
               // Store the mappings to reconstitute xmlns:attributes
               // except prefixes starting with "xml": these are reserved
  -            if (!prefix.startsWith("xml")) {
  +            // VG: (uri != null) fixes NPE in startElement
  +            if (uri != null && !prefix.startsWith("xml")) {
                   this.hasMappings = true;
                   this.prefixList.add(prefix);
                   this.uriList.add(uri);
  
  
  

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