commit | 608df0b24351384bb3d0b3135c88b17b8afadbd2 | [log] [tgz] |
---|---|---|
author | nitind <nitind> | Thu Feb 07 07:49:48 2008 +0000 |
committer | nitind <nitind> | Thu Feb 07 07:49:48 2008 +0000 |
tree | b827fbfbd80b9e1fc0419a9690db4f6d54579666 | |
parent | 92b945e7d753af7ebbb5431c2dc5028c42c91f4e [diff] |
allow null for convenience
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMNamedNodeMapImpl.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMNamedNodeMapImpl.java index 5601956..fee63d2 100644 --- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMNamedNodeMapImpl.java +++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMNamedNodeMapImpl.java
@@ -35,12 +35,14 @@ } public CMNamedNodeMapImpl(CMNamedNodeMap initialContentsMap) { - super(); - int length = initialContentsMap.getLength(); - for (int j = 0; j < length; j++) { - put(initialContentsMap.item(j)); + super(); + if (initialContentsMap != null) { + int length = initialContentsMap.getLength(); + for (int j = 0; j < length; j++) { + put(initialContentsMap.item(j)); + } } - } + } /** * getLength method * @return int