Update of /cvsroot/sblim/jsr48-client/src/javax/cim In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv700/src/javax/cim Modified Files: Tag: Experimental UnsignedInteger64.java UnsignedInteger32.java CIMClass.java UnsignedInteger16.java UnsignedInteger8.java Log Message: 2719 TCK: CIM APIs should not generate NullPointerException Index: UnsignedInteger32.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/cim/UnsignedInteger32.java,v retrieving revision 1.4.2.10 retrieving revision 1.4.2.11 diff -u -d -r1.4.2.10 -r1.4.2.11 --- UnsignedInteger32.java 19 Mar 2010 14:42:13 -0000 1.4.2.10 +++ UnsignedInteger32.java 10 Dec 2013 19:16:22 -0000 1.4.2.11 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2010 + * (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 @@ * 2795671 2009-05-22 raman_arora Add Type to Comparable <T> * 2935258 2010-01-22 blaschke-oss Sync up javax.cim.* javadoc with JSR48 1.0.0 * 2973233 2010-03-19 blaschke-oss TCK: UnsignedIntegerNN.hashCode() not working + * 2719 2013-12-10 blaschke-oss TCK: CIM APIs should not generate NullPointerException */ package javax.cim; @@ -103,6 +104,8 @@ * less than, equal to, or greater than the specified object. */ public int compareTo(UnsignedInteger32 pOther) { + if (pOther == null) throw new IllegalArgumentException( + "Other UnsignedInteger32 cannot be null!"); UnsignedInteger32 that = pOther; long d = this.iValue - that.iValue; if (d == 0) return 0; Index: CIMClass.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/cim/CIMClass.java,v retrieving revision 1.9.2.20 retrieving revision 1.9.2.21 diff -u -d -r1.9.2.20 -r1.9.2.21 --- CIMClass.java 7 Sep 2012 16:40:31 -0000 1.9.2.20 +++ CIMClass.java 10 Dec 2013 19:16:22 -0000 1.9.2.21 @@ -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 @@ -31,6 +31,7 @@ * 3500619 2012-03-16 blaschke-oss JSR48 1.0.0: CIMClass association/key clean up * 3521119 2012-04-24 blaschke-oss JSR48 1.0.0: remove CIMObjectPath 2/3/4-parm ctors * 3565581 2012-09-07 blaschke-oss TCK: remove unnecessary overriding methods + * 2719 2013-12-10 blaschke-oss TCK: CIM APIs should not generate NullPointerException */ package javax.cim; @@ -154,7 +155,7 @@ */ private CIMClass(CIMObjectPath pPath, String pSuperClass, CIMQualifier<?>[] pQualifiers, CIMClassProperty<?>[] pProperties, CIMMethod<?>[] pMethods) { - super(pPath.getObjectName()); + super(pPath == null ? null : pPath.getObjectName()); this.iObjPath = pPath; this.iSuperClass = pSuperClass; this.iQualiImpl = new CIMQualifiedElementInterfaceImpl(pQualifiers); Index: UnsignedInteger16.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/cim/UnsignedInteger16.java,v retrieving revision 1.4.2.10 retrieving revision 1.4.2.11 diff -u -d -r1.4.2.10 -r1.4.2.11 --- UnsignedInteger16.java 19 Mar 2010 14:42:13 -0000 1.4.2.10 +++ UnsignedInteger16.java 10 Dec 2013 19:16:22 -0000 1.4.2.11 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2010 + * (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 @@ * 2795671 2009-05-22 raman_arora Add Type to Comparable <T> * 2935258 2010-01-22 blaschke-oss Sync up javax.cim.* javadoc with JSR48 1.0.0 * 2973233 2010-03-19 blaschke-oss TCK: UnsignedIntegerNN.hashCode() not working + * 2719 2013-12-10 blaschke-oss TCK: CIM APIs should not generate NullPointerException */ package javax.cim; @@ -103,6 +104,8 @@ * less than, equal to, or greater than the specified object. */ public int compareTo(UnsignedInteger16 pOther) { + if (pOther == null) throw new IllegalArgumentException( + "Other UnsignedInteger16 cannot be null!"); UnsignedInteger16 that = pOther; int d = this.iValue - that.iValue; if (d == 0) return 0; Index: UnsignedInteger64.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/cim/UnsignedInteger64.java,v retrieving revision 1.4.2.8 retrieving revision 1.4.2.9 diff -u -d -r1.4.2.8 -r1.4.2.9 --- UnsignedInteger64.java 19 Mar 2010 14:50:30 -0000 1.4.2.8 +++ UnsignedInteger64.java 10 Dec 2013 19:16:22 -0000 1.4.2.9 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2010 + * (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 @@ * 2795671 2009-05-22 raman_arora Add Type to Comparable <T> * 2935258 2010-01-19 blaschke-oss Sync up javax.cim.* javadoc with JSR48 1.0.0 * 2973230 2010-03-19 blaschke-oss TCK: UnsignedInteger64.equals() does not handle null + * 2719 2013-12-10 blaschke-oss TCK: CIM APIs should not generate NullPointerException */ package javax.cim; @@ -78,6 +79,7 @@ * If the number is out of range. */ public UnsignedInteger64(BigInteger pValue) throws NumberFormatException { + if (pValue == null) throw new NumberFormatException("BigInteger value cannot be null!"); setValue(pValue); } @@ -92,6 +94,7 @@ * If the number is out of range. */ public UnsignedInteger64(byte[] pValue) throws NumberFormatException { + if (pValue == null) throw new NumberFormatException("byte[] value cannot be null!"); setValue(new BigInteger(pValue)); } @@ -105,6 +108,7 @@ * If the number is out of range. */ public UnsignedInteger64(String pValue) throws NumberFormatException { + if (pValue == null) throw new NumberFormatException("String value cannot be null!"); setValue(new BigInteger(pValue)); } @@ -128,6 +132,8 @@ * less than, equal to, or greater than the specified object. */ public int compareTo(UnsignedInteger64 pOther) { + if (pOther == null) throw new IllegalArgumentException( + "Other UnsignedInteger64 cannot be null!"); UnsignedInteger64 that = pOther; int d = this.iValue.compareTo(that.iValue); if (d == 0) return 0; Index: UnsignedInteger8.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/cim/UnsignedInteger8.java,v retrieving revision 1.4.2.11 retrieving revision 1.4.2.12 diff -u -d -r1.4.2.11 -r1.4.2.12 --- UnsignedInteger8.java 19 Mar 2010 14:42:13 -0000 1.4.2.11 +++ UnsignedInteger8.java 10 Dec 2013 19:16:22 -0000 1.4.2.12 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2010 + * (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 @@ * 2935258 2010-01-22 blaschke-oss Sync up javax.cim.* javadoc with JSR48 1.0.0 * 2944833 2010-02-08 blaschke-oss Need private setValue in UnsignedInteger8 * 2973233 2010-03-19 blaschke-oss TCK: UnsignedIntegerNN.hashCode() not working + * 2719 2013-12-10 blaschke-oss TCK: CIM APIs should not generate NullPointerException */ package javax.cim; @@ -105,6 +106,8 @@ * less than, equal to, or greater than the specified object. */ public int compareTo(UnsignedInteger8 pOther) { + if (pOther == null) throw new IllegalArgumentException( + "Other UnsignedInteger8 cannot be null!"); UnsignedInteger8 that = pOther; int d = this.iValue - that.iValue; if (d == 0) return 0; |