From 13243b7d59ccb89dbd12fdf50b6eb56e16b07f26 Mon Sep 17 00:00:00 2001
From: davidely <davidely@localhost>
Date: Wed, 17 Jan 2007 04:28:07 +0000
Subject: [PATCH] Fixes for several small SearchFilter and Attribute matching issues (730, 695, 688, 689, 693).  This also includes tests for the SearchFilter class.  I've also elimiated a race condition from the operation test cases.

---
 opends/src/server/org/opends/server/util/StaticUtils.java |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/opends/src/server/org/opends/server/util/StaticUtils.java b/opends/src/server/org/opends/server/util/StaticUtils.java
index d14109b..cce743e 100644
--- a/opends/src/server/org/opends/server/util/StaticUtils.java
+++ b/opends/src/server/org/opends/server/util/StaticUtils.java
@@ -1376,6 +1376,24 @@
   }
 
 
+  /**
+   * Return true if and only if o1 and o2 are both null or o1.equals(o2).
+   *
+   * @param o1 the first object to compare
+   * @param o2 the second object to compare
+   * @return true iff o1 and o2 are equal
+   */
+  public static boolean objectsAreEqual(Object o1, Object o2)
+  {
+    if (o1 == null)
+    {
+      return (o2 == null);
+    }
+    else
+    {
+      return o1.equals(o2);
+    }
+  }
 
   /**
    * Retrieves a stack trace from the provided exception as a single-line
@@ -3115,7 +3133,6 @@
   }
 
 
-
   /**
    * Attempts to delete the specified file or directory.  If it is a directory,
    * then any files or subdirectories that it contains will be recursively

--
Gitblit v1.10.0