You can subscribe to this list here.
2005 |
Jan
|
Feb
(1) |
Mar
(45) |
Apr
(150) |
May
(145) |
Jun
(150) |
Jul
(79) |
Aug
(313) |
Sep
(160) |
Oct
(309) |
Nov
(115) |
Dec
(60) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(160) |
Feb
(144) |
Mar
(127) |
Apr
(48) |
May
(102) |
Jun
(54) |
Jul
(245) |
Aug
(94) |
Sep
(152) |
Oct
(162) |
Nov
(166) |
Dec
(740) |
2007 |
Jan
(752) |
Feb
(437) |
Mar
(328) |
Apr
(373) |
May
(569) |
Jun
(399) |
Jul
(369) |
Aug
(627) |
Sep
(100) |
Oct
(306) |
Nov
(166) |
Dec
(282) |
2008 |
Jan
(68) |
Feb
(145) |
Mar
(180) |
Apr
(160) |
May
(277) |
Jun
(229) |
Jul
(1188) |
Aug
(51) |
Sep
(97) |
Oct
(99) |
Nov
(95) |
Dec
(170) |
2009 |
Jan
(39) |
Feb
(73) |
Mar
(120) |
Apr
(121) |
May
(104) |
Jun
(262) |
Jul
(57) |
Aug
(171) |
Sep
(131) |
Oct
(88) |
Nov
(64) |
Dec
(83) |
2010 |
Jan
(55) |
Feb
(67) |
Mar
(124) |
Apr
(64) |
May
(130) |
Jun
(75) |
Jul
(164) |
Aug
(64) |
Sep
(44) |
Oct
(17) |
Nov
(43) |
Dec
(31) |
2011 |
Jan
(21) |
Feb
(10) |
Mar
(43) |
Apr
(46) |
May
(52) |
Jun
(71) |
Jul
(7) |
Aug
(16) |
Sep
(51) |
Oct
(14) |
Nov
(33) |
Dec
(15) |
2012 |
Jan
(12) |
Feb
(61) |
Mar
(129) |
Apr
(76) |
May
(70) |
Jun
(52) |
Jul
(29) |
Aug
(41) |
Sep
(32) |
Oct
(23) |
Nov
(38) |
Dec
(26) |
2013 |
Jan
(35) |
Feb
(37) |
Mar
(51) |
Apr
(15) |
May
(52) |
Jun
(15) |
Jul
(23) |
Aug
(21) |
Sep
(46) |
Oct
(69) |
Nov
(57) |
Dec
(26) |
2014 |
Jan
(5) |
Feb
(13) |
Mar
(17) |
Apr
(1) |
May
(5) |
Jun
|
Jul
(2) |
Aug
(2) |
Sep
(1) |
Oct
(16) |
Nov
(8) |
Dec
(4) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
(4) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Dave B. <bla...@us...> - 2013-11-26 16:39:23
|
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-serv25992/src/org/sblim/cimclient/internal/cimxml/sax/node Modified Files: Tag: Experimental ValueArrayNode.java ValueRefArrayNode.java Log Message: 2715 Add VALUE.NULL support Index: ValueArrayNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/ValueArrayNode.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 --- ValueArrayNode.java 31 Mar 2012 00:02:16 -0000 1.1.2.11 +++ ValueArrayNode.java 26 Nov 2013 16:39:20 -0000 1.1.2.12 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2012 + * (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 @@ -22,6 +22,7 @@ * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) * 2531371 2009-02-10 raman_arora Upgrade client to JDK 1.5 (Phase 2) * 3513353 2012-03-30 blaschke-oss TCK: CIMDataType arrays must have length >= 1 + * 2715 2013-11-26 blaschke-oss Add VALUE.NULL support */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -37,7 +38,7 @@ import org.xml.sax.SAXException; /** - * ELEMENT VALUE.ARRAY (VALUE*)<br> + * ELEMENT VALUE.ARRAY (VALUE|VALUE.NULL)*<br> * For non-standard CIMOMs the TYPE and PARAMTYPE attributes are handled. */ public class ValueArrayNode extends AbstractArrayValueNode { @@ -81,16 +82,16 @@ @Override public void testChild(String pNodeNameEnum) throws SAXException { - if (pNodeNameEnum != VALUE) throw new SAXException( - "Only VALUE nodes can be added to VALUE.ARRAY nodes but " + pNodeNameEnum - + " found!"); - + if (pNodeNameEnum != VALUE && pNodeNameEnum != VALUE_NULL) throw new SAXException( + "Only VALUE and VALUE.NULL nodes can be added to VALUE.ARRAY nodes but " + + pNodeNameEnum + " found!"); } @Override public void childParsed(Node pChild) { if (this.iValueAL == null) this.iValueAL = new ArrayList<Object>(); - this.iValueAL.add(((ValueNode) pChild).getValue()); + if (pChild instanceof ValueNode) this.iValueAL.add(((ValueNode) pChild).getValue()); + else if (pChild instanceof ValueNullNode) this.iValueAL.add(null); } @Override Index: ValueRefArrayNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/ValueRefArrayNode.java,v retrieving revision 1.1.2.13 retrieving revision 1.1.2.14 diff -u -d -r1.1.2.13 -r1.1.2.14 --- ValueRefArrayNode.java 2 Jul 2013 01:55:25 -0000 1.1.2.13 +++ ValueRefArrayNode.java 26 Nov 2013 16:39:20 -0000 1.1.2.14 @@ -24,6 +24,7 @@ * 3513349 2012-03-31 blaschke-oss TCK: CIMDataType must not accept null string * 3602604 2013-01-29 blaschke-oss Clean up SAXException messages * 2604 2013-07-01 blaschke-oss SAXException messages should contain node name + * 2715 2013-11-26 blaschke-oss Add VALUE.NULL support */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -39,7 +40,7 @@ import org.xml.sax.SAXException; /** - * ELEMENT VALUE.REFARRAY (VALUE.REFERENCE*) + * ELEMENT VALUE.REFARRAY (VALUE.REFERENCE|VALUE.NULL)* */ public class ValueRefArrayNode extends AbstractArrayValueNode { @@ -72,14 +73,18 @@ @Override public void testChild(String pNodeNameEnum) throws SAXException { - if (pNodeNameEnum != VALUE_REFERENCE) throw new SAXException(getNodeName() - + " node child node can be VALUE_REFERENCE only while it is " + pNodeNameEnum + "!"); + if (pNodeNameEnum != VALUE_REFERENCE && pNodeNameEnum != VALUE_NULL) throw new SAXException( + getNodeName() + + " node child node can be VALUE.REFERENCE or VALUE.NULL only while it is " + + pNodeNameEnum + "!"); } @Override public void childParsed(Node pChild) { if (this.iCIMObjPathAL == null) this.iCIMObjPathAL = new ArrayList<CIMObjectPath>(); - this.iCIMObjPathAL.add(((ValueReferenceNode) pChild).getCIMObjectPath()); + if (pChild instanceof ValueReferenceNode) this.iCIMObjPathAL + .add(((ValueReferenceNode) pChild).getCIMObjectPath()); + else if (pChild instanceof ValueNullNode) this.iCIMObjPathAL.add(null); } @Override @@ -100,7 +105,7 @@ } public CIMDataType getType() { - return new CIMDataType(""); + return new CIMDataType("", 0); } private static final CIMObjectPath[] EMPTY_OPA = new CIMObjectPath[0]; |
From: Dave B. <bla...@us...> - 2013-11-25 14:14:48
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/doc-files In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv13647/src/org/sblim/cimclient/doc-files Modified Files: Tag: Experimental unittest.html Log Message: 2714 Add detailed CIM-XML parser test based on DSP0201 2.4 Index: unittest.html =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/doc-files/unittest.html,v retrieving revision 1.1.2.38 retrieving revision 1.1.2.39 diff -u -d -r1.1.2.38 -r1.1.2.39 --- unittest.html 23 Nov 2013 15:17:45 -0000 1.1.2.38 +++ unittest.html 25 Nov 2013 14:14:46 -0000 1.1.2.39 @@ -51,7 +51,7 @@ <h1>Unit Test Coverage</h1> - <p>The SBLIM CIM Client for Java ships with a large collection of around 195 + <p>The SBLIM CIM Client for Java ships with a large collection of around 200 unit tests. Whenever you the "all" target is build with ant the complete unit test suite will be executed. This document describes what is covered by these tests.</p> |
From: Dave B. <bla...@us...> - 2013-11-25 13:56:32
|
Update of /cvsroot/sblim/jsr48-client In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv12585 Modified Files: NEWS Log Message: 2703 MethodNode should not require TYPE attribute Index: NEWS =================================================================== RCS file: /cvsroot/sblim/jsr48-client/NEWS,v retrieving revision 1.406 retrieving revision 1.407 diff -u -d -r1.406 -r1.407 --- NEWS 25 Nov 2013 13:49:28 -0000 1.406 +++ NEWS 25 Nov 2013 13:56:30 -0000 1.407 @@ -1,5 +1,6 @@ Changes in HEAD ================ + 2703 MethodNode should not require TYPE attribute 2702 Bad PROPERTY.ARRAY ARRAYSIZE generates NumberFormatException 2701 PROPERTY.ARRAY does not require TYPE attribute 2700 PROPERTY does not require TYPE attribute |
From: Dave B. <bla...@us...> - 2013-11-25 13:49:31
|
Update of /cvsroot/sblim/jsr48-client In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv12008 Modified Files: NEWS Log Message: 2702 Bad PROPERTY.ARRAY ARRAYSIZE generates NumberFormatException Index: NEWS =================================================================== RCS file: /cvsroot/sblim/jsr48-client/NEWS,v retrieving revision 1.405 retrieving revision 1.406 diff -u -d -r1.405 -r1.406 --- NEWS 25 Nov 2013 13:42:35 -0000 1.405 +++ NEWS 25 Nov 2013 13:49:28 -0000 1.406 @@ -1,5 +1,6 @@ Changes in HEAD ================ + 2702 Bad PROPERTY.ARRAY ARRAYSIZE generates NumberFormatException 2701 PROPERTY.ARRAY does not require TYPE attribute 2700 PROPERTY does not require TYPE attribute 2699 parseQUALIFIER does not require TYPE attribute |
From: Dave B. <bla...@us...> - 2013-11-25 13:49:30
|
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-serv12008/src/org/sblim/cimclient/internal/cimxml/sax/node Modified Files: Node.java Log Message: 2702 Bad PROPERTY.ARRAY ARRAYSIZE generates NumberFormatException Index: Node.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/Node.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Node.java 6 Nov 2013 16:41:43 -0000 1.15 +++ Node.java 25 Nov 2013 13:49:28 -0000 1.16 @@ -26,6 +26,7 @@ * 3602604 2013-01-29 blaschke-oss Clean up SAXException messages * 2605 2013-03-20 buccella SAX parser throws wrong exception * 2693 2013-10-21 blaschke-oss ReturnValueNode allows invalid PARAMTYPE attribute + * 2702 2013-11-07 blaschke-oss Bad PROPERTY.ARRAY ARRAYSIZE generates NumberFormatException */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -253,7 +254,13 @@ // Yes if ISARRAY is true or ARRAYSIZE>-1. boolean isArray = hasTrueAttribute(pAttribs, "ISARRAY"); String arraySizeStr = pAttribs.getValue("ARRAYSIZE"); - int arraySize = (arraySizeStr == null ? (isArray ? 0 : -1) : Integer.parseInt(arraySizeStr)); + int arraySize; + try { + arraySize = (arraySizeStr == null || arraySizeStr.length() == 0 ? (isArray ? 0 : -1) + : Integer.parseInt(arraySizeStr)); + } catch (NumberFormatException e) { + throw new SAXException(arraySizeStr + " is not a valid ARRAYSIZE attribute!"); + } if (isArray || arraySize >= 0) { if (arraySize > 0) return new CIMDataType(type.getType(), arraySize); return CIMHelper.UnboundedArrayDataType(type.getType()); |
From: Dave B. <bla...@us...> - 2013-11-25 13:42:38
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv11616/src/org/sblim/cimclient/internal/cimxml Modified Files: CIMXMLParserImpl.java Log Message: 2701 PROPERTY.ARRAY does not require TYPE attribute Index: CIMXMLParserImpl.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/CIMXMLParserImpl.java,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- CIMXMLParserImpl.java 25 Nov 2013 13:33:29 -0000 1.75 +++ CIMXMLParserImpl.java 25 Nov 2013 13:42:35 -0000 1.76 @@ -82,6 +82,7 @@ * 2696 2013-10-29 blaschke-oss parseIRETURNVALUE ignores VALUE and VALUE.ARRAY * 2699 2013-11-05 blaschke-oss parseQUALIFIER does not require TYPE attribute * 2700 2013-11-07 blaschke-oss PROPERTY does not require TYPE attribute + * 2701 2013-11-07 blaschke-oss PROPERTY.ARRAY does not require TYPE attribute */ package org.sblim.cimclient.internal.cimxml; @@ -2072,6 +2073,8 @@ String name = attribute(pPropArrayE, "NAME"); if (name == null) throw new CIMXMLParseException( "PROPERTY.ARRAY element missing NAME attribute!"); + if (attribute(pPropArrayE, "TYPE") == null && !hasTypeAttrsInNodes(pPropArrayE)) throw new CIMXMLParseException( + "PROPERTY.ARRAY element missing TYPE attribute!"); // String valueArraysizeStr = propertyarrayE.getAttribute("ARRAYSIZE"); |
From: Dave B. <bla...@us...> - 2013-11-25 13:33:31
|
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); } |
From: Dave B. <bla...@us...> - 2013-11-25 13:24:22
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv10675/src/org/sblim/cimclient/internal/cimxml Modified Files: CIMXMLParserImpl.java Log Message: 2699 parseQUALIFIER does not require TYPE attribute Index: CIMXMLParserImpl.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/CIMXMLParserImpl.java,v retrieving revision 1.73 retrieving revision 1.74 diff -u -d -r1.73 -r1.74 --- CIMXMLParserImpl.java 25 Nov 2013 12:55:37 -0000 1.73 +++ CIMXMLParserImpl.java 25 Nov 2013 13:24:19 -0000 1.74 @@ -80,6 +80,7 @@ * 2694 2013-10-25 blaschke-oss NAME attribute not required by DOM parser (part 2) * 2695 2013-10-25 blaschke-oss parseMETHODCALL allows LOCALCLASSPATH and LOCALINSTANCEPATH * 2696 2013-10-29 blaschke-oss parseIRETURNVALUE ignores VALUE and VALUE.ARRAY + * 2699 2013-11-05 blaschke-oss parseQUALIFIER does not require TYPE attribute */ package org.sblim.cimclient.internal.cimxml; @@ -1496,6 +1497,9 @@ String name = attribute(pQualifierE, "NAME"); if (name == null) throw new CIMXMLParseException( "QUALIFIER element missing NAME attribute!"); + String typeStr = attribute(pQualifierE, "TYPE"); + if (typeStr == null && !hasTypeAttrsInNodes(pQualifierE)) throw new CIMXMLParseException( + "QUALIFIER element missing TYPE attribute!"); boolean propagated = MOF.TRUE.equalsIgnoreCase(pQualifierE.getAttribute("PROPAGATED")); // FLAVORS int flavors = parseFLAVORS(pQualifierE); @@ -1529,7 +1533,7 @@ String name = attribute(pQualifierTypeE, "NAME"); if (name == null) throw new CIMXMLParseException( "QUALIFIER.DECLARATION element missing NAME attribute!"); - if (attribute(pQualifierTypeE, "TYPE") == null) throw new CIMXMLParseException( + if (attribute(pQualifierTypeE, "TYPE") == null && !hasTypeAttrsInNodes(pQualifierTypeE)) throw new CIMXMLParseException( "QUALIFIER.DECLARATION element missing TYPE attribute!"); // SCOPES @@ -3137,6 +3141,30 @@ } /** + * hasTypeAttrsInNodes + * + * SVC CIMOM sends typed CIM-XML elements in a non-standard way. The TYPE + * attribute is included in the VALUE or VALUE.ARRAY element not in the + * enclosing element as the standard says. + * + * @param pParentE + * @return boolean + */ + private static boolean hasTypeAttrsInNodes(Element pParentE) { + NodeList nl = pParentE.getChildNodes(); + if (nl == null || nl.getLength() == 0) return false; + for (int i = 0; i < nl.getLength(); i++) { + Node n = nl.item(i); + String name = n.getNodeName(); + if ("VALUE".equalsIgnoreCase(name) || "VALUE.ARRAY".equalsIgnoreCase(name)) { + NamedNodeMap nm = n.getAttributes(); + if (nm != null && nm.getNamedItem("TYPE") != null) return true; + } + } + return false; + } + + /** * searchNodes * * @param pParentE |
From: Dave B. <bla...@us...> - 2013-11-25 13:24:21
|
Update of /cvsroot/sblim/jsr48-client In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv10675 Modified Files: NEWS Log Message: 2699 parseQUALIFIER does not require TYPE attribute Index: NEWS =================================================================== RCS file: /cvsroot/sblim/jsr48-client/NEWS,v retrieving revision 1.402 retrieving revision 1.403 diff -u -d -r1.402 -r1.403 --- NEWS 25 Nov 2013 13:08:32 -0000 1.402 +++ NEWS 25 Nov 2013 13:24:19 -0000 1.403 @@ -1,5 +1,6 @@ Changes in HEAD ================ + 2699 parseQUALIFIER does not require TYPE attribute 2697 (I)MethodResponseNode allows ERROR with PARAMVALUE 2696 parseIRETURNVALUE ignores VALUE and VALUE.ARRAY 2695 parseMETHODCALL allows LOCALCLASSPATH and LOCALINSTANCEPATH |
From: Dave B. <bla...@us...> - 2013-11-25 13:08:36
|
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-serv9634/src/org/sblim/cimclient/internal/cimxml/sax/node Modified Files: IMethodResponseNode.java MethodResponseNode.java Log Message: 2697 (I)MethodResponseNode allows ERROR with PARAMVALUE Index: IMethodResponseNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/IMethodResponseNode.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- IMethodResponseNode.java 13 Apr 2012 12:59:51 -0000 1.9 +++ IMethodResponseNode.java 25 Nov 2013 13:08:32 -0000 1.10 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2012 + * (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 @@ * 2763216 2009-04-14 blaschke-oss Code cleanup: visible spelling/grammar errors * 2845211 2009-08-27 raman_arora Pull Enumeration Feature (SAX Parser) * 3511454 2012-03-27 blaschke-oss SAX nodes not reinitialized properly + * 2697 2012-10-30 blaschke-oss (I)MethodResponseNode allows ERROR with PARAMVALUE */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -57,6 +58,10 @@ private static final CIMArgument<?>[] EMPTY_ARG_A = new CIMArgument[0]; + private boolean iHasError; + + private boolean iHasRetVal; + /** * Ctor. */ @@ -81,6 +86,8 @@ this.iErrorNode = null; this.iRetValNode = null; if (this.iCIMArgAL != null) this.iCIMArgAL.clear(); + this.iHasError = false; + this.iHasRetVal = false; } /** @@ -93,16 +100,29 @@ @Override public void testChild(String pNodeNameEnum) throws SAXException { - if (pNodeNameEnum == ERROR || pNodeNameEnum == IRETURNVALUE) { + if (pNodeNameEnum == ERROR) { String ownedNodeName; - if (this.iRetValNode != null) ownedNodeName = IRETURNVALUE; - else if (this.iErrorNode != null) ownedNodeName = ERROR; + if (this.iHasRetVal) ownedNodeName = IRETURNVALUE; + else if (this.iHasError) ownedNodeName = ERROR; + else if (this.iCIMArgAL != null && this.iCIMArgAL.size() > 0) ownedNodeName = PARAMVALUE; else ownedNodeName = null; if (ownedNodeName != null) throw new SAXException(pNodeNameEnum + " child node is invalid for " + getNodeName() + " node, since it already has a " + ownedNodeName + " child node!"); - } else if (pNodeNameEnum != PARAMVALUE) throw new SAXException(getNodeName() - + " node cannot have " + pNodeNameEnum + " child node!"); + } else if (pNodeNameEnum == IRETURNVALUE) { + String ownedNodeName; + if (this.iHasRetVal) ownedNodeName = IRETURNVALUE; + else if (this.iHasError) ownedNodeName = ERROR; + else ownedNodeName = null; + if (ownedNodeName != null) throw new SAXException(pNodeNameEnum + + " child node is invalid for " + getNodeName() + + " node, since it already has a " + ownedNodeName + " child node!"); + } else if (pNodeNameEnum == PARAMVALUE) { + if (this.iHasError) throw new SAXException(pNodeNameEnum + + " child node is invalid for " + getNodeName() + + " node, since it already has an ERROR child node!"); + } else throw new SAXException(getNodeName() + " node cannot have " + pNodeNameEnum + + " child node!"); } /** @@ -110,6 +130,13 @@ */ @Override public void childParsed(Node pChild) { + if (pChild instanceof ErrorNode) { + this.iHasError = true; + this.iErrorNode = (ErrorNode) pChild; + } else if (pChild instanceof IReturnValueNode) { + this.iHasRetVal = true; + this.iRetValNode = (IReturnValueNode) pChild; + } else // Values of parameters should be stored in array if (pChild instanceof ParamValueNode) { if (this.iCIMArgAL == null) this.iCIMArgAL = new ArrayList<CIMArgument<Object>>(); Index: MethodResponseNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/MethodResponseNode.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- MethodResponseNode.java 13 Apr 2012 12:59:51 -0000 1.11 +++ MethodResponseNode.java 25 Nov 2013 13:08:32 -0000 1.12 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2012 + * (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 @@ -23,6 +23,7 @@ * 2797550 2009-06-01 raman_arora JSR48 compliance - add Java Generics * 2845211 2009-08-27 raman_arora Pull Enumeration Feature (SAX Parser) * 3511454 2012-03-27 blaschke-oss SAX nodes not reinitialized properly + * 2697 2012-10-30 blaschke-oss (I)MethodResponseNode allows ERROR with PARAMVALUE */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -53,6 +54,10 @@ private ArrayList<CIMArgument<Object>> iCIMArgAL; + private boolean iHasError; + + private boolean iHasRetVal; + /** * Ctor. */ @@ -76,6 +81,8 @@ this.iError = null; this.iRetVal = null; if (this.iCIMArgAL != null) this.iCIMArgAL.clear(); + this.iHasError = false; + this.iHasRetVal = false; } /** @@ -88,23 +95,38 @@ @Override public void testChild(String pNodeNameEnum) throws SAXException { - if (pNodeNameEnum == ERROR || pNodeNameEnum == RETURNVALUE) { + if (pNodeNameEnum == ERROR) { String ownedNodeName; - if (this.iRetVal != null) ownedNodeName = RETURNVALUE; - else if (this.iError != null) ownedNodeName = ERROR; + if (this.iHasRetVal) ownedNodeName = RETURNVALUE; + else if (this.iHasError) ownedNodeName = ERROR; + else if (this.iCIMArgAL != null && this.iCIMArgAL.size() > 0) ownedNodeName = PARAMVALUE; else ownedNodeName = null; if (ownedNodeName != null) throw new SAXException(pNodeNameEnum + " child node is invalid for " + getNodeName() + " node, since it already has a " + ownedNodeName + " child node!"); - } else if (pNodeNameEnum != PARAMVALUE) throw new SAXException(getNodeName() - + " node cannot have " + pNodeNameEnum + " child node!"); + } else if (pNodeNameEnum == RETURNVALUE) { + String ownedNodeName; + if (this.iHasRetVal) ownedNodeName = RETURNVALUE; + else if (this.iHasError) ownedNodeName = ERROR; + else ownedNodeName = null; + if (ownedNodeName != null) throw new SAXException(pNodeNameEnum + + " child node is invalid for " + getNodeName() + + " node, since it already has a " + ownedNodeName + " child node!"); + } else if (pNodeNameEnum == PARAMVALUE) { + if (this.iHasError) throw new SAXException(pNodeNameEnum + + " child node is invalid for " + getNodeName() + + " node, since it already has an ERROR child node!"); + } else throw new SAXException(getNodeName() + " node cannot have " + pNodeNameEnum + + " child node!"); } @Override public void childParsed(Node pChild) { if (pChild instanceof ErrorNode) { + this.iHasError = true; this.iError = ((ErrorNode) pChild).getCIMError(); } else if (pChild instanceof ReturnValueNode) { + this.iHasRetVal = true; this.iRetVal = ((ReturnValueNode) pChild).getValue(); } else if (pChild instanceof ParamValueNode) { if (this.iCIMArgAL == null) this.iCIMArgAL = new ArrayList<CIMArgument<Object>>(); |
From: Dave B. <bla...@us...> - 2013-11-25 12:55:40
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv8628/src/org/sblim/cimclient/internal/cimxml Modified Files: CIMXMLParserImpl.java Log Message: 2696 parseIRETURNVALUE ignores VALUE and VALUE.ARRAY Index: CIMXMLParserImpl.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/CIMXMLParserImpl.java,v retrieving revision 1.72 retrieving revision 1.73 diff -u -d -r1.72 -r1.73 --- CIMXMLParserImpl.java 25 Nov 2013 12:37:54 -0000 1.72 +++ CIMXMLParserImpl.java 25 Nov 2013 12:55:37 -0000 1.73 @@ -79,6 +79,7 @@ * 2691 2013-10-18 blaschke-oss RETURNVALUE should not require PARAMTYPE attribute * 2694 2013-10-25 blaschke-oss NAME attribute not required by DOM parser (part 2) * 2695 2013-10-25 blaschke-oss parseMETHODCALL allows LOCALCLASSPATH and LOCALINSTANCEPATH + * 2696 2013-10-29 blaschke-oss parseIRETURNVALUE ignores VALUE and VALUE.ARRAY */ package org.sblim.cimclient.internal.cimxml; @@ -2968,23 +2969,24 @@ } // VALUE - // Vector valueV = searchNodes(ireturnvalueE, "VALUE"); - // if (valueV != null) { - // for (int i=0; i<valueV.size(); i++) { - // Element valueE = (Element)valueV.elementAt(i); - // String valueStr = parseVALUE(valueE); - // // cannot construct a CIMValue without type information - // } - // } + Element[] valElementA = searchNodes(pIRetValE, "VALUE"); + if (valElementA != null && valElementA.length > 0) { + for (int i = 0; i < valElementA.length; i++) { + Element valueE = valElementA[i]; + TypedValue tv = parseVALUE(valueE); + rtnV.add(tv.getValue()); + } + } // VALUE.ARRAY - // Vector valuearrayV = searchNodes(ireturnvalueE, "VALUE.ARRAY"); - // if (valuearrayV != null) { - // for (int i=0; i<valuearrayV.size(); i++) { - // Element valuearrayE = (Element)valuearrayV.elementAt(i); - // // cannot construct a CIMValue without type information - // } - // } + Element[] valArrayElementA = searchNodes(pIRetValE, "VALUE.ARRAY"); + if (valArrayElementA != null && valArrayElementA.length > 0) { + for (int i = 0; i < valArrayElementA.length; i++) { + Element valueArrayE = valArrayElementA[i]; + TypedValue tv = parseVALUEARRAY(valueArrayE); + rtnV.add(tv.getValue()); + } + } // VALUE.REFERENCE Element[] valRefElementA = searchNodes(pIRetValE, "VALUE.REFERENCE"); |
From: Dave B. <bla...@us...> - 2013-11-25 12:37:56
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv7484/src/org/sblim/cimclient/internal/cimxml Modified Files: CIMXMLParserImpl.java Log Message: 2695 parseMETHODCALL allows LOCALCLASSPATH and LOCALINSTANCEPATH Index: CIMXMLParserImpl.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/CIMXMLParserImpl.java,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- CIMXMLParserImpl.java 25 Nov 2013 12:27:38 -0000 1.71 +++ CIMXMLParserImpl.java 25 Nov 2013 12:37:54 -0000 1.72 @@ -78,6 +78,7 @@ * 2537 2013-10-17 blaschke-oss Add new data types for PARAMVALUE * 2691 2013-10-18 blaschke-oss RETURNVALUE should not require PARAMTYPE attribute * 2694 2013-10-25 blaschke-oss NAME attribute not required by DOM parser (part 2) + * 2695 2013-10-25 blaschke-oss parseMETHODCALL allows LOCALCLASSPATH and LOCALINSTANCEPATH */ package org.sblim.cimclient.internal.cimxml; @@ -2517,6 +2518,9 @@ Element localinstancepathE = (Element) searchFirstNode(pMethodCallE, "LOCALINSTANCEPATH"); if (localinstancepathE != null) { + if (localclasspathFound) throw new CIMXMLParseException( + "METHODCALL element cannot have both LOCALCLASSPATH and LOCALINSTANCEPATH child elements!"); + CIMObjectPath path = parseLOCALINSTANCEPATH(localinstancepathE); request.setObjectPath(path); |
From: Dave B. <bla...@us...> - 2013-11-25 12:27:41
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv6822/src/org/sblim/cimclient/internal/cimxml Modified Files: CIMXMLParserImpl.java Log Message: 2694 NAME attribute not required by DOM parser (part 2) Index: CIMXMLParserImpl.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/CIMXMLParserImpl.java,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- CIMXMLParserImpl.java 6 Nov 2013 16:34:47 -0000 1.70 +++ CIMXMLParserImpl.java 25 Nov 2013 12:27:38 -0000 1.71 @@ -77,6 +77,7 @@ * 2688 2013-10-10 blaschke-oss parseMETHODCALL looks for CIMName attribute instead of NAME * 2537 2013-10-17 blaschke-oss Add new data types for PARAMVALUE * 2691 2013-10-18 blaschke-oss RETURNVALUE should not require PARAMTYPE attribute + * 2694 2013-10-25 blaschke-oss NAME attribute not required by DOM parser (part 2) */ package org.sblim.cimclient.internal.cimxml; @@ -2653,6 +2654,11 @@ // EXPMETHODCALL CIMRequest request = new CIMRequest(); + String methodname = attribute(pExpMethodCallE, "NAME"); + if (methodname == null) throw new CIMXMLParseException( + "EXPMETHODCALL element missing NAME attribute!"); + request.setMethodName(methodname); + Element[] paramValElementA = searchNodes(pExpMethodCallE, "EXPPARAMVALUE"); Vector<CIMInstance> v = new Vector<CIMInstance>(); if (paramValElementA != null) { @@ -2679,6 +2685,9 @@ // <!ATTLIST EXPPARAMVALUE // %CIMName;> // INSTANCE + if (attribute(pExpParamValueE, "NAME") == null) throw new CIMXMLParseException( + "EXPPARAMVALUE element missing NAME attribute!"); + Element[] instanceA = searchNodes(pExpParamValueE, "INSTANCE"); if (instanceA != null && instanceA.length > 0) { if (instanceA.length > 1) throw new CIMXMLParseException( |
From: Dave B. <bla...@us...> - 2013-11-23 18:57:37
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv1761/src/org/sblim/cimclient/internal/cimxml Modified Files: Tag: Experimental CIMXMLParserImpl.java Log Message: 2713 Enforce loose validation of CIM-XML documents Index: CIMXMLParserImpl.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/CIMXMLParserImpl.java,v retrieving revision 1.14.2.76 retrieving revision 1.14.2.77 diff -u -d -r1.14.2.76 -r1.14.2.77 --- CIMXMLParserImpl.java 22 Nov 2013 18:05:57 -0000 1.14.2.76 +++ CIMXMLParserImpl.java 23 Nov 2013 18:57:34 -0000 1.14.2.77 @@ -2549,7 +2549,6 @@ || searchNodes(pParamValueE, "VALUE.ARRAY", 0, 1, false) != null || searchNodes(pParamValueE, "VALUE.REFERENCE", 0, 1, false) != null) { TypedValue typedValue = parseSingleValue(pParamValueE, VALUE | VALUEA | VALUEREF); - // checkOtherNodes(pParamValueE, nodesIPARAMVALUE); *DEB if (typedValue.getType() != null) { return new CIMArgument<Object>(name, typedValue .getType(), typedValue.getValue()); } } |
From: Dave B. <bla...@us...> - 2013-11-23 15:17:48
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/doc-files In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20635/src/org/sblim/cimclient/doc-files Modified Files: Tag: Experimental unittest.html Log Message: 2714 Add detailed CIM-XML parser test based on DSP0201 2.4 Index: unittest.html =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/doc-files/unittest.html,v retrieving revision 1.1.2.37 retrieving revision 1.1.2.38 diff -u -d -r1.1.2.37 -r1.1.2.38 --- unittest.html 23 Nov 2013 15:13:11 -0000 1.1.2.37 +++ unittest.html 23 Nov 2013 15:17:45 -0000 1.1.2.38 @@ -206,7 +206,7 @@ a VALUE, VALUE.ARRAY and VALUE.REFERENCE child element.</td></tr> </table> -<h3>wbem.DSP0201</h3> +<h3>wbem.DSP0201Test</h3> <table border="1" cellpadding="5" cellspacing="0" width="100%"> <tr><td>testValidCIMXMLRequests</td> <td>Parses over 140 hand made valid request XML strings with each of |
From: Dave B. <bla...@us...> - 2013-11-23 15:13:13
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/doc-files In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20324/src/org/sblim/cimclient/doc-files Modified Files: Tag: Experimental unittest.html Log Message: 2714 Add detailed CIM-XML parser test based on DSP0201 2.4 Index: unittest.html =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/doc-files/unittest.html,v retrieving revision 1.1.2.36 retrieving revision 1.1.2.37 diff -u -d -r1.1.2.36 -r1.1.2.37 --- unittest.html 29 Oct 2013 18:46:26 -0000 1.1.2.36 +++ unittest.html 23 Nov 2013 15:13:11 -0000 1.1.2.37 @@ -44,6 +44,7 @@ * 2151 2013-08-20 blaschke-oss gzip compression not supported * 2660 2013-09-04 blaschke-oss CIMObjectPath.equalsModelPath same as equals * 2696 2013-10-29 blaschke-oss parseIRETURNVALUE ignores VALUE and VALUE.ARRAY + * 2714 2013-11-22 blaschke-oss Add detailed CIM-XML parser test based on DSP0201 2.4 --> </head> <body style="background-color: white;"> @@ -205,6 +206,25 @@ a VALUE, VALUE.ARRAY and VALUE.REFERENCE child element.</td></tr> </table> +<h3>wbem.DSP0201</h3> + <table border="1" cellpadding="5" cellspacing="0" width="100%"> + <tr><td>testValidCIMXMLRequests</td> + <td>Parses over 140 hand made valid request XML strings with each of + the three parsers and checks that the expected "not-a-response" parsing + exception is thrown.</td></tr> + <tr><td>testInvalidCIMXMLRequests</td> + <td>Parses over 135 hand made invalid request XML strings with each of + the three parsers and checks that the expected parsing exception is + thrown.</td></tr> + <tr><td>testValidCIMXMLResponses</td> + <td>Parses over 250 hand made valid response XML strings with each of + the three parsers and checks that no parsing exception is thrown.</td></tr> + <tr><td>testInvalidCIMXMLResponses</td> + <td>Parses over 175 hand made invalid response XML strings with each of + the three parsers and checks that the expected parsing exception is + thrown.</td></tr> + </table> + <h3>wbem.WBEMClientTest</h3> <table border="1" cellpadding="5" cellspacing="0" width="100%"> <tr><td>testClientIsActive</td> |
From: Dave B. <bla...@us...> - 2013-11-22 18:06:51
|
Update of /cvsroot/sblim/jsr48-client/utst/org/sblim/cimclient/unittest In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv4879/utst/org/sblim/cimclient/unittest Modified Files: Tag: Experimental testcases.parser.txt Log Message: 2714 Add detailed CIM-XML parser test based on DSP0201 2.4 Index: testcases.parser.txt =================================================================== RCS file: /cvsroot/sblim/jsr48-client/utst/org/sblim/cimclient/unittest/testcases.parser.txt,v retrieving revision 1.1.2.13 retrieving revision 1.1.2.14 diff -u -d -r1.1.2.13 -r1.1.2.14 --- testcases.parser.txt 29 Oct 2013 18:46:27 -0000 1.1.2.13 +++ testcases.parser.txt 22 Nov 2013 18:06:46 -0000 1.1.2.14 @@ -11,3 +11,4 @@ wbem.Bug3598613Test wbem.NestedEmbInstTest wbem.IReturnValueTest +wbem.DSP0201Test |
From: Dave B. <bla...@us...> - 2013-11-22 18:06:48
|
Update of /cvsroot/sblim/jsr48-client/utst/org/sblim/cimclient/unittest/wbem In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv4879/utst/org/sblim/cimclient/unittest/wbem Added Files: Tag: Experimental DSP0201Test.java Log Message: 2714 Add detailed CIM-XML parser test based on DSP0201 2.4 --- NEW FILE: DSP0201Test.java --- /** * (C) Copyright IBM Corp. 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Eclipse Public License from * http://www.opensource.org/licenses/eclipse-1.0.php * * @author : Dave Blaschke, bla...@us... * * Flag Date Prog Description * ------------------------------------------------------------------------------- * 2714 2013-11-22 blaschke-oss Add detailed CIM-XML parser test based on DSP0201 2.4 */ package org.sblim.cimclient.unittest.wbem; import java.io.ByteArrayInputStream; [...1883 lines suppressed...] msg.append(" parser "); msg.append((pGroup & (TEST_VALREQ | TEST_VALRSP)) > 0 ? "valid" : "invalid"); msg.append(" CIM-XML "); msg.append((pGroup & (TEST_VALREQ | TEST_INVALREQ)) > 0 ? "request" : "response"); if (pCIMXML != null) { // msg.append("; "); // msg.append(pCIMXML); } if (e != null) { msg.append("; Exception: "); msg.append(e); if (e.getCause() != null && e.getMessage() != null && !e.getMessage().endsWith(e.getCause().getMessage())) { msg.append("; Cause: "); msg.append(e.getCause()); } } return msg.toString(); } } |
From: Dave B. <bla...@us...> - 2013-11-22 18:05:59
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv4813/src/org/sblim/cimclient/internal/cimxml/sax Modified Files: Tag: Experimental XMLDefaultHandlerImpl.java Log Message: 2713 Enforce loose validation of CIM-XML documents Index: XMLDefaultHandlerImpl.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/XMLDefaultHandlerImpl.java,v retrieving revision 1.1.2.9 retrieving revision 1.1.2.10 diff -u -d -r1.1.2.9 -r1.1.2.10 --- XMLDefaultHandlerImpl.java 14 Apr 2009 22:21:54 -0000 1.1.2.9 +++ XMLDefaultHandlerImpl.java 22 Nov 2013 18:05:57 -0000 1.1.2.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 @@ -20,6 +20,7 @@ * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) * 2531371 2009-02-10 raman_arora Upgrade client to JDK 1.5 (Phase 2) * 2763216 2009-04-14 blaschke-oss Code cleanup: visible spelling/grammar errors + * 2713 2013-11-22 blaschke-oss Enforce loose validation of CIM-XML documents */ package org.sblim.cimclient.internal.cimxml.sax; @@ -148,7 +149,14 @@ throws SAXException { this.iStrBuf = null; String nodeNameEnum = NodeFactory.getEnum(qName); - if (nodeNameEnum == null) throw new SAXException(qName + " is not a handled element name!"); + if (nodeNameEnum == null) { + LogAndTraceBroker.getBroker() + .trace( + Level.FINEST, + "Ignoring unrecognized starting CIM-XML element found during parsing: " + + qName); + return; + } Node parentNode = getPeekNode(); if (parentNode == null) { @@ -189,7 +197,11 @@ @Override public void endElement(String uri, String localName, String qName) throws SAXException { String nodeNameEnum = NodeFactory.getEnum(qName); - if (nodeNameEnum == null) throw new SAXException(qName + " is not a handled element name!"); + if (nodeNameEnum == null) { + LogAndTraceBroker.getBroker().trace(Level.FINEST, + "Ignoring unrecognized ending CIM-XML element found during parsing: " + qName); + return; + } Node peekNode = this.iNodeStack.pop(); try { // pass character data |
From: Dave H. <hel...@us...> - 2013-11-16 19:37:24
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "cmpi-base - Base OS CMPI Providers". The branch, master has been updated via 3f41cf1d3ea50eb0563c6422f7919c19330c96f0 (commit) from e37b7403daad73ae928be1915f53fa6178f25e9d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3f41cf1d3ea50eb0563c6422f7919c19330c96f0 Author: Dave Heller <hel...@us...> Date: Sat Nov 16 14:35:30 2013 -0500 Fixed SBLIM-2698: system name might have empty domainname ----------------------------------------------------------------------- Summary of changes: ChangeLog | 7 +++++++ NEWS | 1 + OSBase_Common.c | 14 +++++++++++++- contributions.txt | 4 ++++ 4 files changed, 25 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index f86db38..dd1fe2c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2013-11-16 Dave Heller <hel...@us...> + + * NEWS, contributions.txt, OSBase_Common.c: + + Fixed SBLIM-2698: system name might have empty domainname + (patch by Klaus Kämpf) + 2013-06-11 Dave Heller <hel...@us...> * NEWS, contributions.txt, OSBase_UnixProcess.c: diff --git a/NEWS b/NEWS index 84680d1..6c77e35 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ Changes in Version 1.6.3 Bugs Fixed: - SBLIM-2634: incorrect max cpu frequency - SBLIM-2644: wrong UserModeTime and KernelModeTime +- SBLIM-2698: system name might have empty domainname Changes in Version 1.6.2 ======================== diff --git a/OSBase_Common.c b/OSBase_Common.c index e10a407..46c76e8 100644 --- a/OSBase_Common.c +++ b/OSBase_Common.c @@ -174,11 +174,23 @@ void _init_system_name() { } freeresultbuf(hdout); } + if (!domain || *domain == 0) { /* /bin/dnsdomainname might return empty */ + /* get domain name */ + rc=runcommand("/bin/domainname",NULL,&hdout,NULL); + if (rc == 0 && hdout != NULL) { + if (hdout[0] && *hdout[0] != '(') { /* might return "(none)" */ + domain = strdup(hdout[0]); + ptr = strchr(domain, '\n'); + *ptr = '\0'; + } + freeresultbuf(hdout); + } + } } /* initializes CIM_HOST_NAME */ if( strlen(host) ) { - if( !domain ) { + if(!domain || *domain == 0) { CIM_HOST_NAME = calloc(1,(strlen(host)+1)); strcpy( CIM_HOST_NAME, host); } diff --git a/contributions.txt b/contributions.txt index 5834f5a..241b249 100644 --- a/contributions.txt +++ b/contributions.txt @@ -26,3 +26,7 @@ Henning Sackewitz, ----------------------- 05/28/2013 [ SBLIM-2634 ] incorrect max cpu frequency 06/11/2013 [ SBLIM-2644 ] wrong UserModeTime and KernelModeTime + +Klaus Kämpf, Novell +----------------------- +11/16/2013 [ SBLIM-2698 ] system name might have empty domainname hooks/post-receive -- cmpi-base - Base OS CMPI Providers |
From: Dave B. <bla...@us...> - 2013-11-15 01:21:08
|
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-serv7400/src/org/sblim/cimclient/internal/cimxml/sax/node Modified Files: Tag: Experimental SimpleReqNode.java Log Message: 2712 SimpleReqNode allows any CIM element as child Index: SimpleReqNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/SimpleReqNode.java,v retrieving revision 1.1.2.9 retrieving revision 1.1.2.10 diff -u -d -r1.1.2.9 -r1.1.2.10 --- SimpleReqNode.java 27 Mar 2012 19:06:32 -0000 1.1.2.9 +++ SimpleReqNode.java 15 Nov 2013 01:21:05 -0000 1.1.2.10 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2012 + * (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 @@ -20,6 +20,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) * 3511454 2012-03-27 blaschke-oss SAX nodes not reinitialized properly + * 2712 2013-11-14 blaschke-oss SimpleReqNode allows any CIM element as child */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -71,6 +72,8 @@ public void testChild(String pNodeNameEnum) throws SAXException { if (this.iMethodCallNode != null) throw new SAXException( "SIMPLEREQ node can have only one child node!"); + if (pNodeNameEnum != IMETHODCALL && pNodeNameEnum != METHODCALL) throw new SAXException( + "SIMPLEREQ node cannot have " + pNodeNameEnum + " child node!"); } @Override |
From: Dave B. <bla...@us...> - 2013-11-13 21:31:06
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/http/io In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv23460/src/org/sblim/cimclient/internal/http/io Modified Files: Tag: Experimental ChunkedInputStream.java Log Message: 2709 Lower the level of the EOF message to FINE Index: ChunkedInputStream.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/http/io/ChunkedInputStream.java,v retrieving revision 1.3.2.12 retrieving revision 1.3.2.13 diff -u -d -r1.3.2.12 -r1.3.2.13 --- ChunkedInputStream.java 23 Feb 2013 15:35:16 -0000 1.3.2.12 +++ ChunkedInputStream.java 13 Nov 2013 21:31:02 -0000 1.3.2.13 @@ -26,6 +26,7 @@ * 3557283 2012-11-05 blaschke-oss Print full response when get EOF from CIMOM * 3601894 2013-01-23 blaschke-oss Enhance HTTP and CIM-XML tracing * 2621 2013-02-23 blaschke-oss Not all chunked input has trailers + * 2709 2013-11-13 blaschke-oss Lower the level of the EOF message to FINE */ package org.sblim.cimclient.internal.http.io; @@ -129,7 +130,7 @@ } if (total == -1) { LogAndTraceBroker.getBroker().trace( - Level.WARNING, + Level.FINE, "Unexpected EOF trying to read " + (this.iChunkSize < len ? this.iChunkSize : len) + " bytes from HTTP chunk with remaining length of " @@ -146,7 +147,7 @@ this.iTrailers.examineTrailer(this.iOrigin); } catch (IOException e) { LogAndTraceBroker.getBroker().trace( - Level.WARNING, + Level.FINE, "Unexpected EOF reading trailer, expected fields were " + this.iTrailerFields); throw new EOFException("Unexpected EOF reading trailer"); |
From: Dave B. <bla...@us...> - 2013-11-13 19:09:47
|
Update of /cvsroot/sblim/jsr48-client In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv11875 Modified Files: Tag: Experimental sblim-cim-client2.properties Log Message: 2711 LOCALNAMESPACEPATH allows 0 NAMESPACE children Index: sblim-cim-client2.properties =================================================================== RCS file: /cvsroot/sblim/jsr48-client/sblim-cim-client2.properties,v retrieving revision 1.1.2.44 retrieving revision 1.1.2.45 diff -u -d -r1.1.2.44 -r1.1.2.45 --- sblim-cim-client2.properties 20 Aug 2013 23:42:35 -0000 1.1.2.44 +++ sblim-cim-client2.properties 13 Nov 2013 19:09:44 -0000 1.1.2.45 @@ -864,4 +864,22 @@ # Recognition: Anytime # Default: false # -#sblim.wbem.enableGzipEncoding=false \ No newline at end of file +#sblim.wbem.enableGzipEncoding=false + +# If set to true, the CIM-XML parser will allow empty LOCALNAMESPACEPATH +# elements in incoming responses. If set to false, the parser will not +# allow empty LOCALNAMESPACEPATH elements. +# +# Note: Some older CIMOMs sent empty LOCALNAMESPACEPATHs, relying on the +# client to provide the local namespace path. This is a violation of +# DSP0201, which dictates that LOCALNAMESPACEPATH must contain at least +# one NAMESPACE child. By default, this property is set to false so the +# client can adhere to the CIM-XML specifications. Set this property to +# true if "LOCALNAMESPACEPATH requires NAMESPACE" exceptions occur while +# interacting with one of these older CIMOMs. +# +# Type: Boolean +# Recognition: Anytime +# Default: false +# +#sblim.wbem.cimxmlParser.allowEmptyLocalNameSpacePath=false \ No newline at end of file |
From: Dave B. <bla...@us...> - 2013-11-13 14:16:08
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv23904/src/org/sblim/cimclient/internal/cimxml Modified Files: Tag: Experimental CIMXMLParserImpl.java Log Message: 2710 parseVALUEOBJECTWITH(LOCAL)PATH ignores (LOCAL)CLASSPATH child Index: CIMXMLParserImpl.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/CIMXMLParserImpl.java,v retrieving revision 1.14.2.73 retrieving revision 1.14.2.74 diff -u -d -r1.14.2.73 -r1.14.2.74 --- CIMXMLParserImpl.java 12 Nov 2013 16:32:20 -0000 1.14.2.73 +++ CIMXMLParserImpl.java 13 Nov 2013 14:16:05 -0000 1.14.2.74 @@ -89,6 +89,7 @@ * 2705 2013-11-11 blaschke-oss PARAMETER.ARRAY does not require TYPE attribute * 2706 2013-11-11 blaschke-oss Bad PARAMETER.REFARRAY ARRAYSIZE generates NumberFormatException * 2707 2013-11-12 blaschke-oss INSTANCENAME ignores KEYVALUE and VALUE.REFERENCE children + * 2710 2013-11-13 blaschke-oss parseVALUEOBJECTWITH(LOCAL)PATH ignores (LOCAL)CLASSPATH child */ package org.sblim.cimclient.internal.cimxml; @@ -474,14 +475,14 @@ // CLASSPATH Element classpathE = (Element) searchFirstNode(pValueObjectWithPathE, "CLASSPATH"); if (classpathE != null) { - // CIMObjectPath op = parseCLASSPATH(classpathE); + CIMObjectPath op = parseCLASSPATH(classpathE); // CLASS Element classE = (Element) searchFirstNode(pValueObjectWithPathE, "CLASS"); if (classE == null) { throw new CIMXMLParseException( "VALUE.OBJECTWITHPATH element missing CLASS child element!"); } - // TODO parse CLASS with ObjectPath - CIMClass obj = parseCLASS(classE); + + CIMClass obj = parseCLASS(classE, op); return obj; } @@ -518,14 +519,14 @@ Element localclasspathE = (Element) searchFirstNode(pValueObjectWithLocalPathE, "LOCALCLASSPATH"); if (localclasspathE != null) { - // CIMObjectPath op = parseLOCALCLASSPATH(localclasspathE); + CIMObjectPath op = parseLOCALCLASSPATH(localclasspathE); // CLASS Element classE = (Element) searchFirstNode(pValueObjectWithLocalPathE, "CLASS"); if (classE == null) { throw new CIMXMLParseException( "VALUE.OBJECTWITHLOCALPATH element missing CLASS child element!"); } - // TODO parse class with path - CIMClass obj = parseCLASS(classE); + + CIMClass obj = parseCLASS(classE, op); return obj; } @@ -1135,6 +1136,19 @@ * @throws CIMXMLParseException */ public static CIMClass parseCLASS(Element pClassE) throws CIMXMLParseException { + return parseCLASS(pClassE, null); + } + + /** + * parseCLASS + * + * @param pClassE + * @param pObjectPath + * @return CIMClass + * @throws CIMXMLParseException + */ + public static CIMClass parseCLASS(Element pClassE, CIMObjectPath pObjectPath) + throws CIMXMLParseException { // <!ELEMENT CLASS (QUALIFIER*, // (PROPERTY|PROPERTY.ARRAY|PROPERTY.REFERENCE)*,METHOD*)> // <!ATTLIST CLASS %NAME;%SUPERCLASS;> @@ -1179,8 +1193,9 @@ * CIMClassProperty[] props, CIMMethod[] pMethods, boolean * pIsAssociation, boolean pIsKeyed ) */ - return new CIMClass(cLocalPathBuilder.build(name, null), superClass, qualis, props, - methods, hasAssocQuali(qualis), hasKeyProp(props)); + return new CIMClass( + pObjectPath == null ? cLocalPathBuilder.build(name, null) : pObjectPath, + superClass, qualis, props, methods, hasAssocQuali(qualis), hasKeyProp(props)); } private static boolean hasAssocQuali(CIMQualifier<?>[] pQualis) { |
From: Dave B. <bla...@us...> - 2013-11-12 19:39:35
|
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-serv15130/src/org/sblim/cimclient/internal/cimxml/sax/node Modified Files: Tag: Experimental CIMNode.java Log Message: 2708 CIMNode quietly ignores DECLARATION child Index: CIMNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/CIMNode.java,v retrieving revision 1.1.2.9 retrieving revision 1.1.2.10 diff -u -d -r1.1.2.9 -r1.1.2.10 --- CIMNode.java 2 Jul 2013 01:55:25 -0000 1.1.2.9 +++ CIMNode.java 12 Nov 2013 19:39:33 -0000 1.1.2.10 @@ -20,6 +20,7 @@ * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) * 3511454 2012-03-27 blaschke-oss SAX nodes not reinitialized properly * 2604 2013-07-01 blaschke-oss SAXException messages should contain node name + * 2708 2013-11-12 blaschke-oss CIMNode quietly ignores DECLARATION child */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -81,8 +82,9 @@ String msg = "CIM node also has a " + this.iContent.getNodeName() + " child node!"; throw new SAXException(msg); } - if (pNodeNameEnum == MESSAGE || pNodeNameEnum == DECLARATION) return; - String msg = pNodeNameEnum + " cannot be a child node of CIM node!"; + if (pNodeNameEnum == MESSAGE) return; + String msg = (pNodeNameEnum == DECLARATION) ? "DECLARATION child node not supported by CIM node!" + : pNodeNameEnum + " cannot be a child node of CIM node!"; throw new SAXException(msg); } |