SourceForge has been redesigned. Learn more.
Close

#2581 JSR Client Compiling failure due to PMD violation

Code_Cleanup
open-later
jsr48-client
2
2014-01-22
2012-12-17
Samuel
No

Got PMD failure when compiling the client, here is the output:
[INFO] PMD Failure: javax.cim.CIMArgument:76 Rule:OverrideBothEqualsAndHashcode Priority:2 Ensure you override both equals() and hashCode().
[INFO] PMD Failure: javax.cim.CIMClass:177 Rule:OverrideBothEqualsAndHashcode Priority:2 Ensure you override both equals() and hashCode().
[INFO] PMD Failure: javax.cim.CIMClassProperty:94 Rule:OverrideBothEqualsAndHashcode Priority:2 Ensure you override both equals() and hashCode().
[INFO] PMD Failure: javax.cim.CIMDateTimeAbsolute:273 Rule:OverrideBothEqualsAndHashcode Priority:2 Ensure you override both equals() and hashCode().
[INFO] PMD Failure: javax.cim.CIMDateTimeInterval:341 Rule:OverrideBothEqualsAndHashcode Priority:2 Ensure you override both equals() and hashCode().
[INFO] PMD Failure: javax.cim.CIMMethod:99 Rule:OverrideBothEqualsAndHashcode Priority:2 Ensure you override both equals() and hashCode().
[INFO] PMD Failure: javax.cim.CIMParameter:87 Rule:OverrideBothEqualsAndHashcode Priority:2 Ensure you override both equals() and hashCode().
[INFO] PMD Failure: javax.cim.CIMProperty:108 Rule:OverrideBothEqualsAndHashcode Priority:2 Ensure you override both equals() and hashCode().
[INFO] PMD Failure: javax.cim.CIMQualifier:117 Rule:OverrideBothEqualsAndHashcode Priority:2 Ensure you override both equals() and hashCode().
[INFO] PMD Failure: javax.cim.CIMQualifierType:102 Rule:OverrideBothEqualsAndHashcode Priority:2 Ensure you override both equals() and hashCode().

Discussion

  • Dave Blaschke

    Dave Blaschke - 2012-12-31
    • assigned_to: nobody --> blaschke-oss
     
  • Dave Blaschke

    Dave Blaschke - 2012-12-31

    Apologies for the delay, the Java CIM Client development team is on vacation and will return to work on January 2.

     
  • Dave Blaschke

    Dave Blaschke - 2013-01-02

    The Java CIM Client is tied to the JSR48 specification in this regard and must implement each and every method that the reference implementation does. If the Client were to implement the "missing" methods identified by PMD, it would fail the JSR48 TCK. As an example, I added CIMArgument.hashCode() and received the following TCK failure:

    Expected Methods : [equals] Returned Methods : [equals, hashCode] The number of methods returned from javax.cim.CIMArgument class does not match from the specification. expected:<1> but was:<2>

    I can raise this issue with the JSR48 chair, but until the spec changes the Client's hands are tied.

     
  • Dave Blaschke

    Dave Blaschke - 2013-01-08

    Note sent to JSR48 chair, awaiting response

     
  • Dave Blaschke

    Dave Blaschke - 2013-01-09

    JSR48 chair response - "we can address this in the next rev as it is easy to do"

     
  • Dave Blaschke

    Dave Blaschke - 2013-01-09

    As mentioned in the previous comment, this issue will be addressed in the next revision (1.0.1, 1.1.0, 2.0.0?) of the JSR48 spec. When this revision is officially released is another question altogether, could be a few months, could be next year, could be longer - the wheels of standards approval move very slowly.

    If this timeframe is an issue for you, please comment accordingly.

     
  • Dave Blaschke

    Dave Blaschke - 2013-01-14

    Lowering priority one notch below normal, this bug is dependent on JSR48 1.0.1/1.1 changes

     
  • Dave Blaschke

    Dave Blaschke - 2013-01-14
    • priority: 5 --> 4
     
  • Dave Blaschke

    Dave Blaschke - 2013-02-20

    Classic ID #3596841

     
  • Dave Blaschke

    Dave Blaschke - 2013-02-20
    • component: --> jsr48-client
    • milestone: --> Code_Cleanup
     
  • Dave Blaschke

    Dave Blaschke - 2014-01-22
    • status: open --> open-later
    • Priority: 4 --> 2
     
  • Dave Blaschke

    Dave Blaschke - 2014-01-22

    This is officially a JSR48 2.0 work item, the following changes are included in the javadocs of the Alpha version received Jan 21, 2014:

    • Add CIMArgument.hashCode
    • Add CIMClass.hashCode
    • Add CIMClassProperty.hashCode
    • Add CIMDataType.hashCode
    • Add CIMDateTimeAbsolute.equals
    • Add CIMDateTimeInterval.equals
    • Add CIMMethod.hashCode
    • Add CIMParameter.hashCode
    • Add CIMProperty.hashCode
    • Add CIMQualifier.hashCode
    • Add CIMQualifierType.hashCode
    • Add CIMTypedElement.hashCode
     

Log in to post a comment.