Update of /cvsroot/sblim/jsr48-client/smpl/org/sblim/cimclient/samples
In directory vz-cvs-3.sog:/tmp/cvs-serv9337/smpl/org/sblim/cimclient/samples
Modified Files:
Jsr48PegasusIndicationSample.java
Log Message:
3374206 - NullPointerException caused by Indication
Index: Jsr48PegasusIndicationSample.java
===================================================================
RCS file: /cvsroot/sblim/jsr48-client/smpl/org/sblim/cimclient/samples/Jsr48PegasusIndicationSample.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Jsr48PegasusIndicationSample.java 10 May 2011 19:25:24 -0000 1.4
+++ Jsr48PegasusIndicationSample.java 10 Aug 2011 11:52:14 -0000 1.5
@@ -15,6 +15,7 @@
* 3182121 2011-02-15 blaschke-oss Add Jsr48PegasusIndicationSample
* 3185818 2011-02-18 blaschke-oss indicationOccured URL incorrect
* 3267429 2011-04-01 blaschke-oss Samples should close client
+ * 3374206 2011-07-22 blaschke-oss NullPointerException caused by Indication
*/
package org.sblim.cimclient.samples;
@@ -141,11 +142,12 @@
System.out.println("The URL could NOT be parsed: " + e);
}
System.out.println(Jsr48CimSample.toMof(pIndication));
- System.out
- .println("Based on content of indication, CIMOM DOES"
- + ((pIndication.getProperty("SequenceContext") == null)
- || (pIndication.getProperty("SequenceNumber") == null) ? " NOT "
- : " ") + "support reliable indications.");
+ CIMProperty<?> context = pIndication.getProperty("SequenceContext");
+ CIMProperty<?> number = pIndication.getProperty("SequenceNumber");
+ System.out.println("Based on content of indication, CIMOM DOES"
+ + (context == null || number == null || context.getValue() == null
+ || number.getValue() == null ? " NOT " : " ")
+ + "support reliable indications.");
}
}, Integer.parseInt(LISTENER_PORT), PROTOCOL);
|