Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml
In directory vz-cvs-3.sog:/tmp/cvs-serv15376/src/org/sblim/cimclient/internal/cimxml
Modified Files:
Tag: Experimental
CIMXMLParserImpl.java
Log Message:
3526679 - DOM parser ignores ERROR node CODE
Index: CIMXMLParserImpl.java
===================================================================
RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/CIMXMLParserImpl.java,v
retrieving revision 1.14.2.37
retrieving revision 1.14.2.38
diff -u -d -r1.14.2.37 -r1.14.2.38
--- CIMXMLParserImpl.java 25 Apr 2012 02:34:36 -0000 1.14.2.37
+++ CIMXMLParserImpl.java 14 May 2012 21:43:31 -0000 1.14.2.38
@@ -54,6 +54,7 @@
* 3513349 2012-03-31 blaschke-oss TCK: CIMDataType must not accept null string
* 3466280 2012-04-23 blaschke-oss get instance failure for CIM_IndicationSubscription
* 3521119 2012-04-24 blaschke-oss JSR48 1.0.0: remove CIMObjectPath 2/3/4-parm ctors
+ * 3526679 2012-05-14 blaschke-oss DOM parser ignores ERROR node CODE
*/
package org.sblim.cimclient.internal.cimxml;
@@ -2645,6 +2646,7 @@
} catch (Exception e) {
LogAndTraceBroker.getBroker().trace(Level.WARNING,
"exception while parsing error code from XML", e);
+ errorCode = WBEMException.CIM_ERR_FAILED;
}
Attr error_descriptionA = (Attr) searchAttribute(pErrorE, "DESCRIPTION");
String description = "";
@@ -2666,9 +2668,10 @@
// throw new CIMException(CIMException.getErrorName(errorCode),
// description.substring(description.indexOf(':')+1));
- if (!rtnV.isEmpty()) return new WBEMException(WBEMException.CIM_ERR_FAILED, "ErrorCode:"
- + errorCode + " description:" + description, rtnV.toArray(new CIMInstance[0]));
- return new WBEMException("ErrorCode:" + errorCode + " description:" + description);
+ if (!rtnV.isEmpty()) return new WBEMException(errorCode, "ErrorCode:" + errorCode
+ + " description:" + description, rtnV.toArray(new CIMInstance[0]));
+ return new WBEMException(errorCode, "ErrorCode:" + errorCode + " description:"
+ + description);
}
/**
|