Update of /cvsroot/sblim/jsr48-client/src/javax/cim In directory vz-cvs-3.sog:/tmp/cvs-serv20410/src/javax/cim Modified Files: Tag: Experimental CIMValuedElement.java CIMProperty.java CIMParameter.java CIMQualifierType.java CIMClass.java CIMDateTimeAbsolute.java CIMClassProperty.java CIMMethod.java CIMQualifier.java CIMDateTimeInterval.java CIMArgument.java CIMTypedElement.java Log Message: 3400209 - Highlighted Static Analysis (PMD) issues Index: CIMDateTimeInterval.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/cim/CIMDateTimeInterval.java,v retrieving revision 1.5.2.17 retrieving revision 1.5.2.18 diff -u -d -r1.5.2.17 -r1.5.2.18 --- CIMDateTimeInterval.java 7 Jul 2010 11:47:22 -0000 1.5.2.17 +++ CIMDateTimeInterval.java 8 Sep 2011 12:26:10 -0000 1.5.2.18 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2010 + * (C) Copyright IBM Corp. 2006, 2011 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -29,6 +29,7 @@ * 2994249 2010-04-30 blaschke-oss CIMDateTimeInterval(long) calculates milliseconds * 3018178 2010-06-18 blaschke-oss CIMDateTimeInterval clean up * 3026302 2010-07-07 blaschke-oss CIMDateTimeInterval uses # constructor instead of valueOf + * 3400209 2011-08-31 blaschke-oss Highlighted Static Analysis (PMD) issues */ package javax.cim; @@ -249,6 +250,23 @@ } /** + * Determines whether the <code>CIMDateTimeInterval</code> that is passed in + * is equal to the current <code>CIMDateTimeInterval</code> object. + * + * @param pObj + * The <code>CIMDateTimeInterval</code> object to compare to. + * @return <code>true</code> if this <code>CIMDateTimeInterval</code> object + * is equal to the one that was passed in, otherwise + * <code>false</code>. + */ + @Override + public boolean equals(Object pObj) { + if (!(pObj instanceof CIMDateTimeInterval)) return false; + CIMDateTimeInterval that = (CIMDateTimeInterval) pObj; + return getDateTimeString().equals(that.getDateTimeString()); + } + + /** * Gets the internal string representation of this object. * * @return The internal representation of the Index: CIMClassProperty.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/cim/CIMClassProperty.java,v retrieving revision 1.5.2.17 retrieving revision 1.5.2.18 diff -u -d -r1.5.2.17 -r1.5.2.18 --- CIMClassProperty.java 29 Jul 2010 18:44:27 -0000 1.5.2.17 +++ CIMClassProperty.java 8 Sep 2011 12:26:10 -0000 1.5.2.18 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2010 + * (C) Copyright IBM Corp. 2006, 2011 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -25,6 +25,7 @@ * 2935258 2010-01-22 blaschke-oss Sync up javax.cim.* javadoc with JSR48 1.0.0 * 2944839 2010-02-08 blaschke-oss Remove redundant toString() methods * 2944842 2010-02-08 blaschke-oss Missing thrown ArrayIndexOutOfBoundsException + * 3400209 2011-08-31 blaschke-oss Highlighted Static Analysis (PMD) issues */ package javax.cim; @@ -188,6 +189,18 @@ } /** + * Returns a hash code value for the CIM class property. This method is + * supported for the benefit of hashtables such as those provided by + * <code>java.util.Hashtable</code>. + * + * @return A hash code value for this CIM class property. + */ + @Override + public int hashCode() { + return toString().hashCode(); + } + + /** * Checks whether the specified qualifier is one of the qualifiers defined * for this property. * Index: CIMProperty.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/cim/CIMProperty.java,v retrieving revision 1.7.2.9 retrieving revision 1.7.2.10 diff -u -d -r1.7.2.9 -r1.7.2.10 --- CIMProperty.java 22 Jan 2010 18:39:48 -0000 1.7.2.9 +++ CIMProperty.java 8 Sep 2011 12:26:09 -0000 1.7.2.10 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2010 + * (C) Copyright IBM Corp. 2006, 2011 * * 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 @@ * 2763216 2009-04-14 blaschke-oss Code cleanup: visible spelling/grammar errors * 2797550 2009-06-01 raman_arora JSR48 compliance - add Java Generics * 2935258 2010-01-22 blaschke-oss Sync up javax.cim.* javadoc with JSR48 1.0.0 + * 3400209 2011-08-31 blaschke-oss Highlighted Static Analysis (PMD) issues */ package javax.cim; @@ -124,6 +125,18 @@ } /** + * Returns a hash code value for the CIM property. This method is supported + * for the benefit of hashtables such as those provided by + * <code>java.util.Hashtable</code>. + * + * @return A hash code value for this CIM property. + */ + @Override + public int hashCode() { + return toString().hashCode(); + } + + /** * Convenience method for determining if this property is a Key. * * @return <code>true</code> if this property is a key. Index: CIMTypedElement.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/cim/CIMTypedElement.java,v retrieving revision 1.6.2.8 retrieving revision 1.6.2.9 diff -u -d -r1.6.2.8 -r1.6.2.9 --- CIMTypedElement.java 5 Feb 2010 20:41:53 -0000 1.6.2.8 +++ CIMTypedElement.java 8 Sep 2011 12:26:10 -0000 1.6.2.9 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2010 + * (C) Copyright IBM Corp. 2006, 2011 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -18,6 +18,7 @@ * 2227442 2008-11-05 blaschke-oss Add missing serialVersionUID * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) * 2935258 2010-01-22 blaschke-oss Sync up javax.cim.* javadoc with JSR48 1.0.0 + * 3400209 2011-08-31 blaschke-oss Highlighted Static Analysis (PMD) issues */ package javax.cim; @@ -78,6 +79,18 @@ } /** + * Returns a hash code value for the CIM typed element. This method is + * supported for the benefit of hashtables such as those provided by + * <code>java.util.Hashtable</code>. + * + * @return A hash code value for this CIM typed element. + */ + @Override + public int hashCode() { + return toString().hashCode(); + } + + /** * Returns a <code>String</code> representation of the CIM Element. This * method is intended to be used only for debugging purposes, and the format * of the returned string may vary between implementations. The returned Index: CIMClass.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/cim/CIMClass.java,v retrieving revision 1.9.2.15 retrieving revision 1.9.2.16 diff -u -d -r1.9.2.15 -r1.9.2.16 --- CIMClass.java 24 Mar 2010 14:17:41 -0000 1.9.2.15 +++ CIMClass.java 8 Sep 2011 12:26:10 -0000 1.9.2.16 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2010 + * (C) Copyright IBM Corp. 2006, 2011 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -26,6 +26,7 @@ * 2935258 2010-01-22 blaschke-oss Sync up javax.cim.* javadoc with JSR48 1.0.0 * 2944842 2010-02-08 blaschke-oss Missing thrown ArrayIndexOutOfBoundsException * 2975917 2010-03-24 blaschke-oss TCK: CIMClass.getProperty() does not handle null property + * 3400209 2011-08-31 blaschke-oss Highlighted Static Analysis (PMD) issues */ package javax.cim; @@ -419,6 +420,18 @@ } /** + * Returns a hash code value for the CIM class. This method is supported for + * the benefit of hashtables such as those provided by + * <code>java.util.Hashtable</code>. + * + * @return A hash code value for this CIM class. + */ + @Override + public int hashCode() { + return toString().hashCode(); + } + + /** * Checks whether the specified qualifier is one of the qualifiers in this * CIM class. * Index: CIMValuedElement.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/cim/CIMValuedElement.java,v retrieving revision 1.6.2.8 retrieving revision 1.6.2.9 diff -u -d -r1.6.2.8 -r1.6.2.9 --- CIMValuedElement.java 5 Feb 2010 20:41:53 -0000 1.6.2.8 +++ CIMValuedElement.java 8 Sep 2011 12:26:09 -0000 1.6.2.9 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2010 + * (C) Copyright IBM Corp. 2006, 2011 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -18,6 +18,7 @@ * 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 * 2935258 2010-01-22 blaschke-oss Sync up javax.cim.* javadoc with JSR48 1.0.0 + * 3400209 2011-08-31 blaschke-oss Highlighted Static Analysis (PMD) issues */ package javax.cim; @@ -87,6 +88,18 @@ } /** + * Returns a hash code value for the CIM valued element. This method is + * supported for the benefit of hashtables such as those provided by + * <code>java.util.Hashtable</code>. + * + * @return A hash code value for this CIM valued element. + */ + @Override + public int hashCode() { + return toString().hashCode(); + } + + /** * Returns a <code>String</code> representation of the CIM Element. This * method is intended to be used only for debugging purposes, and the format * of the returned string may vary between implementations. The returned Index: CIMArgument.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/cim/CIMArgument.java,v retrieving revision 1.3.2.8 retrieving revision 1.3.2.9 diff -u -d -r1.3.2.8 -r1.3.2.9 --- CIMArgument.java 8 Feb 2010 20:56:03 -0000 1.3.2.8 +++ CIMArgument.java 8 Sep 2011 12:26:10 -0000 1.3.2.9 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2010 + * (C) Copyright IBM Corp. 2006, 2011 * * 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 @@ * 2797550 2009-06-01 raman_arora JSR48 compliance - add Java Generics * 2935258 2010-01-22 blaschke-oss Sync up javax.cim.* javadoc with JSR48 1.0.0 * 2944839 2010-02-08 blaschke-oss Remove redundant toString() methods + * 3400209 2011-08-31 blaschke-oss Highlighted Static Analysis (PMD) issues */ package javax.cim; @@ -76,4 +77,15 @@ return super.equals(pObj); } + /** + * Returns a hash code value for the CIM argument. This method is supported + * for the benefit of hashtables such as those provided by + * <code>java.util.Hashtable</code>. + * + * @return A hash code value for this CIM argument. + */ + @Override + public int hashCode() { + return super.hashCode(); + } } Index: CIMDateTimeAbsolute.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/cim/CIMDateTimeAbsolute.java,v retrieving revision 1.7.2.16 retrieving revision 1.7.2.17 diff -u -d -r1.7.2.16 -r1.7.2.17 --- CIMDateTimeAbsolute.java 30 Jun 2010 14:00:29 -0000 1.7.2.16 +++ CIMDateTimeAbsolute.java 8 Sep 2011 12:26:10 -0000 1.7.2.17 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2010 + * (C) Copyright IBM Corp. 2006, 2011 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -25,6 +25,7 @@ * 2944826 2010-02-08 blaschke-oss getUTCOffset() incorrect if not significant field * 2973300 2010-03-19 blaschke-oss TCK: CIMDateTimeXXX.compareTo() does not handle null * 3022501 2010-06-30 blaschke-oss Possible integer overflow in getTotalUSec + * 3400209 2011-08-31 blaschke-oss Highlighted Static Analysis (PMD) issues */ package javax.cim; @@ -160,6 +161,23 @@ } /** + * Determines whether the <code>CIMDateTimeAbsolute</code> that is passed in + * is equal to the current <code>CIMDateTimeAbsolute</code> object. + * + * @param pObj + * The <code>CIMDateTimeAbsolute</code> object to compare to. + * @return <code>true</code> if this <code>CIMDateTimeAbsolute</code> object + * is equal to the one that was passed in, otherwise + * <code>false</code>. + */ + @Override + public boolean equals(Object pObj) { + if (!(pObj instanceof CIMDateTimeAbsolute)) return false; + CIMDateTimeAbsolute that = (CIMDateTimeAbsolute) pObj; + return getDateTimeString().equals(that.getDateTimeString()); + } + + /** * Gets the internal string representation of the date/time object. * * @return The internal representation of the date/time object. Index: CIMQualifierType.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/cim/CIMQualifierType.java,v retrieving revision 1.5.2.9 retrieving revision 1.5.2.10 diff -u -d -r1.5.2.9 -r1.5.2.10 --- CIMQualifierType.java 24 Mar 2010 16:52:12 -0000 1.5.2.9 +++ CIMQualifierType.java 8 Sep 2011 12:26:10 -0000 1.5.2.10 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2010 + * (C) Copyright IBM Corp. 2006, 2011 * * 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 @@ * 2797550 2009-06-01 raman_arora JSR48 compliance - add Java Generics * 2935258 2010-01-22 blaschke-oss Sync up javax.cim.* javadoc with JSR48 1.0.0 * 2975989 2010-03-24 blaschke-oss TCK: CIMQualifierType constructor does not handle null + * 3400209 2011-08-31 blaschke-oss Highlighted Static Analysis (PMD) issues */ package javax.cim; @@ -134,6 +135,18 @@ } /** + * Returns a hash code value for the CIM qualifier type. This method is + * supported for the benefit of hashtables such as those provided by + * <code>java.util.Hashtable</code>. + * + * @return A hash code value for this CIM qualifier type. + */ + @Override + public int hashCode() { + return toString().hashCode(); + } + + /** * Returns a <code>String</code> representation of the * <code>CIMQualifierType</code> This method is intended to be used only for * debugging purposes, and the format of the returned string may vary Index: CIMParameter.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/cim/CIMParameter.java,v retrieving revision 1.6.2.10 retrieving revision 1.6.2.11 diff -u -d -r1.6.2.10 -r1.6.2.11 --- CIMParameter.java 8 Feb 2010 21:16:03 -0000 1.6.2.10 +++ CIMParameter.java 8 Sep 2011 12:26:10 -0000 1.6.2.11 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2010 + * (C) Copyright IBM Corp. 2006, 2011 * * 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 @@ * 2797550 2009-06-01 raman_arora JSR48 compliance - add Java Generics * 2935258 2010-01-22 blaschke-oss Sync up javax.cim.* javadoc with JSR48 1.0.0 * 2944842 2010-02-08 blaschke-oss Missing thrown ArrayIndexOutOfBoundsException + * 3400209 2011-08-31 blaschke-oss Highlighted Static Analysis (PMD) issues */ package javax.cim; @@ -161,6 +162,18 @@ } /** + * Returns a hash code value for the CIM parameter. This method is supported + * for the benefit of hashtables such as those provided by + * <code>java.util.Hashtable</code>. + * + * @return A hash code value for this CIM parameter. + */ + @Override + public int hashCode() { + return toString().hashCode(); + } + + /** * Checks whether the specified qualifier is one of the qualifiers in this * CIM element. * Index: CIMQualifier.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/cim/CIMQualifier.java,v retrieving revision 1.5.2.9 retrieving revision 1.5.2.10 diff -u -d -r1.5.2.9 -r1.5.2.10 --- CIMQualifier.java 22 Jan 2010 18:39:48 -0000 1.5.2.9 +++ CIMQualifier.java 8 Sep 2011 12:26:10 -0000 1.5.2.10 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2010 + * (C) Copyright IBM Corp. 2006, 2011 * * 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 @@ * 2763216 2009-04-14 blaschke-oss Code cleanup: visible spelling/grammar errors * 2797550 2009-06-01 raman_arora JSR48 compliance - add Java Generics * 2935258 2010-01-22 blaschke-oss Sync up javax.cim.* javadoc with JSR48 1.0.0 + * 3400209 2011-08-31 blaschke-oss Highlighted Static Analysis (PMD) issues */ package javax.cim; @@ -129,6 +130,18 @@ } /** + * Returns a hash code value for the CIM qualifier. This method is supported + * for the benefit of hashtables such as those provided by + * <code>java.util.Hashtable</code>. + * + * @return A hash code value for this CIM qualifier. + */ + @Override + public int hashCode() { + return toString().hashCode(); + } + + /** * Determines if this qualifier is propagated. If the qualifier was * inherited, this value will be <code>true</code>. If the qualifier was * applied to the element directly, this value will be <code>false</code>. Index: CIMMethod.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/cim/CIMMethod.java,v retrieving revision 1.7.2.11 retrieving revision 1.7.2.12 diff -u -d -r1.7.2.11 -r1.7.2.12 --- CIMMethod.java 19 May 2010 16:59:01 -0000 1.7.2.11 +++ CIMMethod.java 8 Sep 2011 12:26:10 -0000 1.7.2.12 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2010 + * (C) Copyright IBM Corp. 2006, 2011 * * 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 @@ * 2935258 2010-01-22 blaschke-oss Sync up javax.cim.* javadoc with JSR48 1.0.0 * 2944842 2010-02-08 blaschke-oss Missing thrown ArrayIndexOutOfBoundsException * 3001333 2010-05-19 blaschke-oss CIMMethod class ignores propagated parameter + * 3400209 2011-08-31 blaschke-oss Highlighted Static Analysis (PMD) issues */ package javax.cim; @@ -226,6 +227,18 @@ } /** + * Returns a hash code value for the CIM method. This method is supported + * for the benefit of hashtables such as those provided by + * <code>java.util.Hashtable</code>. + * + * @return A hash code value for this CIM method. + */ + @Override + public int hashCode() { + return toString().hashCode(); + } + + /** * Checks whether the specified qualifier is one of the qualifiers in this * CIM method. * |