From: <svn...@os...> - 2011-05-31 23:50:07
|
Author: jdeolive Date: 2011-05-31 16:49:59 -0700 (Tue, 31 May 2011) New Revision: 37354 Modified: trunk/modules/extension/xsd/xsd-core/src/main/java/org/geotools/xml/Encoder.java Log: adding null check on element declaration into recursive call Modified: trunk/modules/extension/xsd/xsd-core/src/main/java/org/geotools/xml/Encoder.java =================================================================== --- trunk/modules/extension/xsd/xsd-core/src/main/java/org/geotools/xml/Encoder.java 2011-05-31 06:24:26 UTC (rev 37353) +++ trunk/modules/extension/xsd/xsd-core/src/main/java/org/geotools/xml/Encoder.java 2011-05-31 23:49:59 UTC (rev 37354) @@ -1147,8 +1147,8 @@ if (node instanceof Element) { Element child = (Element) node; - start(child, Schemas.getChildElementDeclaration(declaration, - new QName(child.getNamespaceURI(), child.getNodeName()))); + start(child, declaration != null ? Schemas.getChildElementDeclaration(declaration, + new QName(child.getNamespaceURI(), child.getNodeName())) : null); end(child); } } |