From: Dave B. <bla...@us...> - 2013-04-18 23:02:34
|
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-serv15919/src/org/sblim/cimclient/internal/cimxml/sax/node Modified Files: Tag: Experimental ParameterRefArrayNode.java ParamValueNode.java Node.java Log Message: 2605 SAX parser throws wrong exception Index: ParameterRefArrayNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/ParameterRefArrayNode.java,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -u -d -r1.1.2.7 -r1.1.2.8 --- ParameterRefArrayNode.java 23 Feb 2009 18:25:57 -0000 1.1.2.7 +++ ParameterRefArrayNode.java 18 Apr 2013 23:02:30 -0000 1.1.2.8 @@ -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 @@ -19,6 +19,7 @@ * 2003590 2008-06-30 blaschke-oss Change licensing from CPL to EPL * 2433593 2008-12-18 rgummada isArray returns true for method parameters of type reference * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) + * 2605 2013-03-20 buccella SAX parser throws wrong exception */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -26,6 +27,7 @@ import javax.cim.CIMDataType; import org.xml.sax.Attributes; +import org.xml.sax.SAXException; /** * <pre> @@ -48,7 +50,7 @@ } @Override - protected void specificInit(Attributes pAttribs) { + protected void specificInit(Attributes pAttribs) throws SAXException { this.iType = new CIMDataType(getReferenceClass(pAttribs), getArraySize(pAttribs)); } Index: Node.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/Node.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 --- Node.java 30 Jan 2013 14:57:10 -0000 1.1.2.13 +++ Node.java 18 Apr 2013 23:02:30 -0000 1.1.2.14 @@ -24,6 +24,7 @@ * 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 * 3602604 2013-01-29 blaschke-oss Clean up SAXException messages + * 2605 2013-03-20 buccella SAX parser throws wrong exception */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -216,12 +217,13 @@ * * @param pAttribs * @return int + * @throws SAXException */ - public static int getArraySize(Attributes pAttribs) { + public static int getArraySize(Attributes pAttribs) throws SAXException { String arraySizeStr = pAttribs.getValue("ARRAYSIZE"); // 0 - unbounded size int size = arraySizeStr == null ? 0 : Integer.parseInt(arraySizeStr); - if (size < 0) throw new IllegalArgumentException("ARRAYSIZE cannot be " + size + "!"); + if (size < 0) throw new SAXException("ARRAYSIZE cannot be " + size + "!"); return size; } Index: ParamValueNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/ParamValueNode.java,v retrieving revision 1.1.2.10 retrieving revision 1.1.2.11 diff -u -d -r1.1.2.10 -r1.1.2.11 --- ParamValueNode.java 1 Jun 2009 17:01:10 -0000 1.1.2.10 +++ ParamValueNode.java 18 Apr 2013 23:02:30 -0000 1.1.2.11 @@ -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 + * 2605 2013-03-20 buccella SAX parser throws wrong exception */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -94,7 +95,7 @@ CIMDataType rawType = this.iEmbObjHandler.getRawType(); if (rawType != null) { if (pNodeNameEnum == VALUE_REFERENCE || pNodeNameEnum == VALUE_REFARRAY) { - if (rawType.getType() != CIMDataType.REFERENCE) throw new IllegalArgumentException( + if (rawType.getType() != CIMDataType.REFERENCE) throw new SAXException( "PARAMVALUE node's PARAMTYPE attribute is not reference (" + rawType + "), but a " + pNodeNameEnum + " child node is found!"); } |