You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2006/09/01 08:33:43 UTC
svn commit: r439207 -
/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StaxSource.java
Author: gnodet
Date: Thu Aug 31 23:33:43 2006
New Revision: 439207
URL: http://svn.apache.org/viewvc?rev=439207&view=rev
Log:
Possible NPE when using the StaxSource. The default namespace URI should be "" and not null.
Modified:
incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StaxSource.java
Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StaxSource.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StaxSource.java?rev=439207&r1=439206&r2=439207&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StaxSource.java (original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StaxSource.java Thu Aug 31 23:33:43 2006
@@ -41,8 +41,6 @@
private ContentHandler contentHandler;
- private char[] chars = new char[1024];
-
public StaxSource(XMLStreamReader streamReader) {
this.streamReader = streamReader;
setInputSource(new InputSource());
@@ -148,7 +146,7 @@
}
// Default namespace
if (prefix == null || prefix.length() == 0) {
- attrs.addAttribute(null,
+ attrs.addAttribute(XMLConstants.DEFAULT_NS_PREFIX,
null,
XMLConstants.XMLNS_ATTRIBUTE,
"CDATA",