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-serv11135/src/org/sblim/cimclient/internal/cimxml/sax/node
Modified Files:
PropertyNode.java
Log Message:
2700 PROPERTY does not require TYPE attribute
Index: PropertyNode.java
===================================================================
RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/PropertyNode.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- PropertyNode.java 12 Jun 2009 02:33:23 -0000 1.9
+++ PropertyNode.java 25 Nov 2013 13:33:29 -0000 1.10
@@ -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
+ * 2700 2013-11-07 blaschke-oss PROPERTY does not require TYPE attribute
*/
package org.sblim.cimclient.internal.cimxml.sax.node;
@@ -52,6 +53,8 @@
// VALUE element
private boolean iHasValue;
+ private boolean iHasTypeAttribute;
+
private Object iValue;
private EmbObjHandler iEmbObjHandler;
@@ -65,14 +68,17 @@
@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.iHasValue = false;
}
@Override
- public void childValueNodeParsed(Node pChild) {
+ public void childValueNodeParsed(Node pChild) throws SAXException {
this.iHasValue = true;
+ if (!this.iHasTypeAttribute && ((ValueNode) pChild).getType() == null) throw new SAXException(
+ "PROPERTY element missing TYPE attribute!");
this.iEmbObjHandler.addValueNode((ValueNode) pChild);
}
|