From 56e752193bfb90d11cfe73c35a24e576b9b18c87 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 03 Jul 2013 11:03:06 +0000
Subject: [PATCH] First stab at having debuggable ACIs.

---
 opends/src/server/org/opends/server/authorization/dseecompat/IP.java |   39 ++++++++++++++++++++++++++-------------
 1 files changed, 26 insertions(+), 13 deletions(-)

diff --git a/opends/src/server/org/opends/server/authorization/dseecompat/IP.java b/opends/src/server/org/opends/server/authorization/dseecompat/IP.java
index 18e390f..bb88bd9 100644
--- a/opends/src/server/org/opends/server/authorization/dseecompat/IP.java
+++ b/opends/src/server/org/opends/server/authorization/dseecompat/IP.java
@@ -23,8 +23,8 @@
  *
  *
  *      Copyright 2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2013 ForgeRock AS
  */
-
 package org.opends.server.authorization.dseecompat;
 import org.opends.messages.Message;
 
@@ -41,23 +41,21 @@
  */
 public class IP implements KeywordBindRule {
 
-    /*
-      Regular expression used to do a quick check on the characters in a
-      bind rule address. These are all of the valid characters that may
-      appear in an bind rule address part.
-    */
+    /**
+     * Regular expression used to do a quick check on the characters in a
+     * bind rule address. These are all of the valid characters that may
+     * appear in an bind rule address part.
+     */
     private  static final String ipRegEx =
             "((?i)[\\.{1}[a-f]\\d:\\+{1}\\*/{1}\\t\\[{1}\\]{1}]+(?-i))";
 
-    /*
-      List of the pattern classes, one for each address decoded from the
-      bind rule.
-    */
+    /**
+     * List of the pattern classes, one for each address decoded from the bind
+     * rule.
+     */
     private List<PatternIP> patternIPList=null;
 
-    /*
-      The type of the bind rule (!= or =).
-     */
+    /** The type of the bind rule (!= or =). */
     private EnumBindRuleType type=null;
 
     /**
@@ -129,4 +127,19 @@
         }
         return matched.getRet(type, false);
     }
+
+    /** {@inheritDoc} */
+    @Override
+    public String toString() {
+        final StringBuilder sb = new StringBuilder();
+        toString(sb);
+        return sb.toString();
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public final void toString(StringBuilder buffer) {
+        buffer.append(super.toString());
+    }
+
 }

--
Gitblit v1.10.0