Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem/indications
In directory vz-cvs-3.sog:/tmp/cvs-serv9337/src/org/sblim/cimclient/internal/wbem/indications
Modified Files:
CIMIndicationHandler.java
Log Message:
3374206 - NullPointerException caused by Indication
Index: CIMIndicationHandler.java
===================================================================
RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem/indications/CIMIndicationHandler.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- CIMIndicationHandler.java 4 Jun 2011 10:33:10 -0000 1.22
+++ CIMIndicationHandler.java 10 Aug 2011 11:52:13 -0000 1.23
@@ -33,6 +33,7 @@
* 3288721 2011-05-20 blaschke-oss Need the function of indication reordering
* 3304058 2011-05-20 blaschke-oss Use same date format in change history
* 3304953 2011-05-20 blaschke-oss Indication URL mapped to lower case
+ * 3374206 2011-07-22 blaschke-oss NullPointerException caused by Indication
*/
package org.sblim.cimclient.internal.wbem.indications;
@@ -247,8 +248,8 @@
if (!this.iRIInitialized) {
this.iRIInitialized = true;
- // Reliable indication not found, disable support and go ahead and
- // deliver
+ // Initial indication does not contain reliable indication
+ // properties, disable support and go ahead and deliver
if (seqCtxProp == null || seqNumProp == null) {
this.iRISupported = false;
@@ -260,6 +261,20 @@
return true;
}
+ // Initial indication does not contain reliable indication
+ // properties with non-null values, disable support and go ahead and
+ // deliver
+ if (seqCtxProp.getValue() == null || seqNumProp.getValue() == null) {
+ this.iRISupported = false;
+
+ this.iLogger
+ .trace(
+ Level.FINE,
+ "Reliable indication support disabled, initial indication does not contain SequenceContext and SequenceNumber properties with non-null values");
+
+ return true;
+ }
+
// Reliable indication found, enable support
this.iRISupported = true;
@@ -303,7 +318,17 @@
// contain both properties, go ahead and deliver
if (seqCtxProp == null || seqNumProp == null) {
this.iLogger.trace(Level.FINE,
- "Reliable indication support enabled but sequence property(s) missing:\n"
+ "Reliable indication support enabled but sequence property missing:\n"
+ + pIndication.toString());
+
+ return true;
+ }
+
+ // Reliable indication support is enabled but indication does not
+ // contain both properties with non-null values, go ahead and deliver
+ if (seqCtxProp.getValue() == null || seqNumProp.getValue() == null) {
+ this.iLogger.trace(Level.FINE,
+ "Reliable indication support enabled but sequence property has null value:\n"
+ pIndication.toString());
return true;
|