From 6439bba5cc09d6febc59bdc9e0d9bc25f1f1eb18 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Wed, 01 Sep 2010 09:04:15 +0000
Subject: [PATCH] Various improvements:

---
 sdk/src/org/opends/sdk/controls/EntryChangeNotificationResponseControl.java |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/sdk/src/org/opends/sdk/controls/EntryChangeNotificationResponseControl.java b/sdk/src/org/opends/sdk/controls/EntryChangeNotificationResponseControl.java
index 1c3a5b4..6c29336 100644
--- a/sdk/src/org/opends/sdk/controls/EntryChangeNotificationResponseControl.java
+++ b/sdk/src/org/opends/sdk/controls/EntryChangeNotificationResponseControl.java
@@ -157,16 +157,19 @@
 
       final Schema schema = options.getSchemaResolver().resolveSchema(
           previousDNString);
-      DN previousDN;
-      try
+      DN previousDN = null;
+      if (previousDNString != null)
       {
-        previousDN = DN.valueOf(previousDNString, schema);
-      }
-      catch (final LocalizedIllegalArgumentException e)
-      {
-        final LocalizableMessage message = ERR_ECN_INVALID_PREVIOUS_DN
-            .get(getExceptionMessage(e));
-        throw DecodeException.error(message, e);
+        try
+        {
+          previousDN = DN.valueOf(previousDNString, schema);
+        }
+        catch (final LocalizedIllegalArgumentException e)
+        {
+          final LocalizableMessage message = ERR_ECN_INVALID_PREVIOUS_DN
+              .get(getExceptionMessage(e));
+          throw DecodeException.error(message, e);
+        }
       }
 
       return new EntryChangeNotificationResponseControl(control.isCritical(),

--
Gitblit v1.10.0