#2249 NullPointerException caused by Indication

Usability
closed-fixed
Dave Blaschke
5
2011-09-15
2011-07-21
Dennis Jurgensen
No

The listener received an indication that had non-null SequenceNumber and SequenceContext Properties, however, getValue() for those properties returned null. This maybe a matter of interpretation as to how an optional property is implemented. Should the property be null, or non-null with a null value. In any case maybe the listener should be a bit more defensive and if the property is non-null check to see if the value is also non-null and make a decision based on those results. I made local changes that seemed to handle this in CIMIndicationHandler.deliverIndication() where I changed two if statements from:
if (seqCtxProp == null || seqNumProp == null) {
to:
if (seqCtxProp == null || seqNumProp == null || seqCtxProp.getValue() == null || seqNumProp.getValue() == null) {
but a more thorough examination, may uncover additional changes.

Discussion

  • Dave Blaschke
    Dave Blaschke
    2011-07-21

    • assigned_to: nobody --> bestorga-oss
    • status: open --> open-accepted
     
  • Dave Blaschke
    Dave Blaschke
    2011-07-21

    • assigned_to: bestorga-oss --> blaschke-oss
     
  • Dave Blaschke
    Dave Blaschke
    2011-07-22

    Chatted with Andreas Maier and here is his response to what does "If a CIM service does not support sequence identifiers for indications, this property shall be NULL" mean:

    "In CIM-XML, a (non-array) property that is NULL can either be part of the instance representation, using no VALUE child element, or it can be omitted from the instance"

    So, the property can be null or non-null with a null value.

     
  • Dave Blaschke
    Dave Blaschke
    2011-07-22

    Patch sent for community review. During a 2 week period any
    exploiter may comment on the patch, request changes or turn it
    down completely (with good reason). For the time being the patch is part of the "Experimental" branch in CVS.

     
  • Dave Blaschke
    Dave Blaschke
    2011-07-22

    • status: open-accepted --> open-fixed
     
  • Dave Blaschke
    Dave Blaschke
    2011-08-10

    Patch against HEAD

     
    Attachments
  • Dave Blaschke
    Dave Blaschke
    2011-08-10

    The community review has completed and we received no substantial criticism. Therefore the patch has been approved and merged into the "HEAD" branch. The next release will pick it up.

     
  • Dave Blaschke
    Dave Blaschke
    2011-08-10

    • status: open-fixed --> pending-fixed
     
  • Dave Blaschke
    Dave Blaschke
    2011-09-15

    The patch was picked up by release 2.1.10 and will therefore be closed.

     
  • Dave Blaschke
    Dave Blaschke
    2011-09-15

    • status: pending-fixed --> closed-fixed