From 78794fdcf6817de6ea4a3231d13773b0211ec6f7 Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Thu, 25 Feb 2016 17:28:50 +0000
Subject: [PATCH] Prep work for OPENDJ-1342: align APIs for DNs

---
 opendj-server-legacy/src/test/java/org/opends/server/types/TestDN.java |   47 -----------------------------------------------
 opendj-server-legacy/src/main/java/org/opends/server/types/DN.java     |    2 +-
 2 files changed, 1 insertions(+), 48 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/types/DN.java b/opendj-server-legacy/src/main/java/org/opends/server/types/DN.java
index da6c01a..8e2f427 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/types/DN.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/types/DN.java
@@ -345,7 +345,7 @@
    * @return  A new DN that is a descendant of this DN, using the
    *          specified RDN components.
    */
-  public DN concat(RDN[] rdnComponents)
+  private DN concat(RDN[] rdnComponents)
   {
     RDN[] newComponents =
          new RDN[rdnComponents.length+this.rdnComponents.length];
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/types/TestDN.java b/opendj-server-legacy/src/test/java/org/opends/server/types/TestDN.java
index 2ad462c..0120baf 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/types/TestDN.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/types/TestDN.java
@@ -856,53 +856,6 @@
     assertEquals(dn.child(rdn), expected);
   }
 
-
-
-  /**
-   * Test the concat(RDN...) method.
-   *
-   * @throws Exception
-   *           If the test failed unexpectedly.
-   */
-  @Test(expectedExceptions = { NullPointerException.class,
-      AssertionError.class })
-  public void testConcatRDNException() throws Exception {
-    DN dn = DN.valueOf("dc=org");
-    dn.concat((RDN[]) null);
-  }
-
-
-
-  /**
-   * Test the concat(RDN[]...) method.
-   *
-   * @param s
-   *          The test DN string.
-   * @param l
-   *          The local name to be appended.
-   * @param e
-   *          The expected DN.
-   * @throws Exception
-   *           If the test failed unexpectedly.
-   */
-  @Test(dataProvider = "createConcatDNTestData")
-  public void testConcatRDNSequence1(String s, String l, String e)
-      throws Exception {
-    DN dn = DN.valueOf(s);
-    DN localName = DN.valueOf(l);
-    DN expected = DN.valueOf(e);
-
-    // Construct sequence.
-    RDN[] rdns = new RDN[localName.size()];
-    for (int i = 0; i < localName.size(); i++) {
-      rdns[i] = localName.getRDN(i);
-    }
-
-    assertEquals(dn.concat(rdns), expected);
-  }
-
-
-
   /**
    * Get local name test data provider.
    *

--
Gitblit v1.10.0