ws-commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r613213 - /webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java
Date Fri, 18 Jan 2008 17:35:25 GMT
Author: dims
Date: Fri Jan 18 09:35:23 2008
New Revision: 613213

URL: http://svn.apache.org/viewvc?rev=613213&view=rev
Log:
some defensive code to prevent NPE (and fix build break)

Modified:
    webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java

Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java?rev=613213&r1=613212&r2=613213&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java
(original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java
Fri Jan 18 09:35:23 2008
@@ -288,7 +288,9 @@
         for (int i = 0;  i < prefixes.length;  i++) {
             String prefix = prefixes[i];
             String uri = ctx.getNamespaceURI(prefix);
-            schema_ns.put(uri, prefix);
+            if(uri != null && prefix != null) {
+                schema_ns.put(uri, prefix);
+            }
         }
         //for schema that not set the xmlns attrib member
         if (schema_ns.get(xsdNamespace) == null) {



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


Mime
View raw message