From f0348538e061941eff777a8e7a3756ff96c02be3 Mon Sep 17 00:00:00 2001
From: lutoff <lutoff@localhost>
Date: Tue, 03 Oct 2006 07:14:40 +0000
Subject: [PATCH] Check null value to prevent NullPointerException
---
opends/src/server/org/opends/server/controls/MatchedValuesFilter.java | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/opends/src/server/org/opends/server/controls/MatchedValuesFilter.java b/opends/src/server/org/opends/server/controls/MatchedValuesFilter.java
index c30b487e..58cbb2f 100644
--- a/opends/src/server/org/opends/server/controls/MatchedValuesFilter.java
+++ b/opends/src/server/org/opends/server/controls/MatchedValuesFilter.java
@@ -268,9 +268,16 @@
String.valueOf(assertionValue));
- String rawAttributeType = attributeType.getNameOrOID();
- ASN1OctetString rawAssertionValue =
- assertionValue.getValue().toASN1OctetString();
+ String rawAttributeType = null ;
+ ASN1OctetString rawAssertionValue = null ;
+ if (attributeType != null)
+ {
+ rawAttributeType = attributeType.getNameOrOID();
+ }
+ if (assertionValue != null)
+ {
+ rawAssertionValue = assertionValue.getValue().toASN1OctetString();
+ }
MatchedValuesFilter filter =
new MatchedValuesFilter(EQUALITY_MATCH_TYPE, rawAttributeType,
--
Gitblit v1.10.0