From 61be60eef8694b2c28386faf6dd2d7c4e842addd Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Thu, 16 Jun 2011 18:00:52 +0000
Subject: [PATCH] Fix OPENDJ-198: RFC 4512 compliance for ldap-toolkit

---
 opendj3/opendj-ldap-sdk/src/main/java/com/forgerock/opendj/util/StaticUtils.java |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/opendj3/opendj-ldap-sdk/src/main/java/com/forgerock/opendj/util/StaticUtils.java b/opendj3/opendj-ldap-sdk/src/main/java/com/forgerock/opendj/util/StaticUtils.java
index 734c62e..cbd42f0 100644
--- a/opendj3/opendj-ldap-sdk/src/main/java/com/forgerock/opendj/util/StaticUtils.java
+++ b/opendj3/opendj-ldap-sdk/src/main/java/com/forgerock/opendj/util/StaticUtils.java
@@ -1773,6 +1773,25 @@
 
 
   /**
+   * Indicates whether the provided character is a keychar.
+   *
+   * @param c
+   *          The character for which to make the determination.
+   * @param allowCompatChars
+   *          {@code true} if certain illegal characters should be allowed for
+   *          compatibility reasons.
+   * @return <CODE>true</CODE> if the provided character represents a
+   *         keychar, or <CODE>false</CODE> if not.
+   */
+  public static boolean isKeyChar(final char c, final boolean allowCompatChars)
+  {
+    final ASCIICharProp cp = ASCIICharProp.valueOf(c);
+    return cp != null ? cp.isKeyChar(allowCompatChars) : false;
+  }
+
+
+
+  /**
    * Returns a string whose content is the string representation of the objects
    * contained in the provided collection concatenated together using the
    * provided separator.

--
Gitblit v1.10.0