Author: sdzmitrovich
Date: 2008-07-31 06:56:33 -0400 (Thu, 31 Jul 2008)
New Revision: 9448
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/model/NodeProxy.java
Log:
add check for null
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/model/NodeProxy.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/model/NodeProxy.java 2008-07-31
10:37:35 UTC (rev 9447)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/model/NodeProxy.java 2008-07-31
10:56:33 UTC (rev 9448)
@@ -62,13 +62,15 @@
NamedNodeMap basicAttributes = basicNode.getAttributes();
NamedNodeMap newAttributes = new NamedNodeMapImpl();
- for (int i = 0; i < basicAttributes.getLength(); i++) {
+ if (basicAttributes != null)
+ for (int i = 0; i < basicAttributes.getLength(); i++) {
- IDOMAttr attr = (IDOMAttr) basicAttributes.item(i);
+ IDOMAttr attr = (IDOMAttr) basicAttributes.item(i);
- newAttributes.setNamedItem(new AttributeProxy(attr, basicOffset));
+ newAttributes
+ .setNamedItem(new AttributeProxy(attr, basicOffset));
- }
+ }
return newAttributes;
}