Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv29031/src/org/sblim/cimclient/internal/cimxml/sax/node
Modified Files:
Tag: Experimental
PropertyArrayNode.java
Log Message:
2701 PROPERTY.ARRAY does not require TYPE attribute
Index: PropertyArrayNode.java
===================================================================
RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/PropertyArrayNode.java,v
retrieving revision 1.1.2.11
retrieving revision 1.1.2.12
diff -u -d -r1.1.2.11 -r1.1.2.12
--- PropertyArrayNode.java 1 Jun 2009 17:01:10 -0000 1.1.2.11
+++ PropertyArrayNode.java 7 Nov 2013 21:10:05 -0000 1.1.2.12
@@ -1,5 +1,5 @@
/**
- * (C) Copyright IBM Corp. 2006, 2009
+ * (C) Copyright IBM Corp. 2006, 2013
*
* THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
* ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
@@ -21,6 +21,7 @@
* 2003590 2008-06-30 blaschke-oss Change licensing from CPL to EPL
* 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1)
* 2797550 2009-06-01 raman_arora JSR48 compliance - add Java Generics
+ * 2701 2013-11-07 blaschke-oss PROPERTY.ARRAY does not require TYPE attribute
*/
package org.sblim.cimclient.internal.cimxml.sax.node;
@@ -52,6 +53,8 @@
// required for super.testChild()
private boolean iHasValueArray;
+ private boolean iHasTypeAttribute;
+
private CIMDataType iType;
private Object iValue;
@@ -67,13 +70,16 @@
@Override
protected void specificInit(Attributes pAttribs, SAXSession pSession) throws SAXException {
+ this.iHasTypeAttribute = (getCIMType(pAttribs, true) != null);
this.iEmbObjHandler = EmbObjHandler.init(this.iEmbObjHandler, getNodeName(), pAttribs,
pSession, this.iQualiHandler, true);
this.iHasValueArray = false;
}
@Override
- protected void childValueNodeParsed(Node pChild) {
+ protected void childValueNodeParsed(Node pChild) throws SAXException {
+ if (!this.iHasTypeAttribute && ((ValueArrayNode) pChild).getType() == null) throw new SAXException(
+ "PROPERTY.ARRAY element missing TYPE attribute!");
this.iEmbObjHandler.addValueNode((ValueArrayNode) pChild);
this.iHasValueArray = true;
}
|