cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r158912 - cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/dom/DOMStreamer.java cocoon/branches/BRANCH_2_1_X/status.xml
Date Thu, 24 Mar 2005 13:15:20 GMT
Author: cziegeler
Date: Thu Mar 24 05:15:19 2005
New Revision: 158912

URL: http://svn.apache.org/viewcvs?view=rev&rev=158912
Log:
Fix NPE in DOMStreamer.stream().

Modified:
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/dom/DOMStreamer.java
    cocoon/branches/BRANCH_2_1_X/status.xml

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/dom/DOMStreamer.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/dom/DOMStreamer.java?view=diff&r1=158911&r2=158912
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/dom/DOMStreamer.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/dom/DOMStreamer.java Thu Mar
24 05:15:19 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -260,8 +260,10 @@
         }
 
         private final void dispatchChars(Node node) throws SAXException {
-            String data = ((Text) node).getData();
-            contentHandler.characters(data.toCharArray(), 0, data.length());
+            final String data = ((Text) node).getData();
+            if ( data != null ) {
+                contentHandler.characters(data.toCharArray(), 0, data.length());
+            }
         }
 
         /**
@@ -275,8 +277,10 @@
                 case Node.COMMENT_NODE:
                     {
                         if (lexicalHandler != null) {
-                            String data = ((Comment) node).getData();
-                            lexicalHandler.comment(data.toCharArray(), 0, data.length());
+                            final String data = ((Comment) node).getData();
+                            if ( data != null ) {
+                                lexicalHandler.comment(data.toCharArray(), 0, data.length());
+                            }
                         }
                     }
                     break;
@@ -658,9 +662,8 @@
                 }
                 if (parent != null) {
                     return parent.findPrefix(namespaceURI);
-                } else {
-                    return null;
                 }
+                return null;
             }
 
             /**
@@ -673,10 +676,10 @@
                         return uri;
                     }
                 }
-                if (parent != null)
+                if (parent != null) {
                     return parent.findNamespaceURI(prefix);
-                else
-                    return null;
+                }
+                return null;
             }
         }
     }

Modified: cocoon/branches/BRANCH_2_1_X/status.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/status.xml?view=diff&r1=158911&r2=158912
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/status.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/status.xml Thu Mar 24 05:15:19 2005
@@ -202,8 +202,11 @@
 
   <changes>
   <release version="@version@" date="@date@">
-    <action dev="NN" type="add">
-      Dummy
+    <action dev="CZ" type="fix" fixes-bug="33963" due-to="John Yonosh" due-to-email="jyonosh@fcg.com">
+      Fix NPE in DOMStreamer.stream().
+    </action>
+    <action dev="CZ" type="fix">
+      Portal block: Make portal manager available through portal component manager.
     </action>
   </release>
   <release version="2.1.7" date="March 23 2005">



Mime
View raw message