From b9bb359678d90a418e9bbaa4788928b39acd0522 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 12 May 2015 13:08:26 +0000
Subject: [PATCH] Fixed javadocs referring to old APIs

---
 opendj-server-legacy/src/test/java/org/opends/server/backends/GenericBackendTestCase.java  |  149 ++++-------------------------
 opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/RootContainer.java |   13 --
 opendj-server-legacy/src/main/java/org/opends/server/api/Backend.java                      |   83 ++++++++--------
 3 files changed, 63 insertions(+), 182 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/api/Backend.java b/opendj-server-legacy/src/main/java/org/opends/server/api/Backend.java
index 7ba233b..159926e 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/api/Backend.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/api/Backend.java
@@ -606,33 +606,36 @@
   public abstract boolean supports(BackendOperation backendOperation);
 
   /**
-   * Exports the contents of this backend to LDIF.  This method should
-   * only be called if {@code supportsLDIFExport} returns
-   * {@code true}.  Note that the server will not explicitly
-   * initialize this backend before calling this method.
+   * Exports the contents of this backend to LDIF. This method should only be called if
+   * {@link #supports(BackendOperation)} with {@link BackendOperation#LDIF_EXPORT} returns
+   * {@code true}.
+   * <p>
+   * Note that the server will not explicitly initialize this backend before calling this method.
    *
-   * @param  exportConfig  The configuration to use when performing
-   *                       the export.
-   *
-   * @throws  DirectoryException  If a problem occurs while performing
-   *                              the LDIF export.
+   * @param exportConfig
+   *          The configuration to use when performing the export.
+   * @throws DirectoryException
+   *           If a problem occurs while performing the LDIF export.
    */
   public abstract void exportLDIF(LDIFExportConfig exportConfig) throws DirectoryException;
 
   /**
-   * Imports information from an LDIF file into this backend.  This
-   * method should only be called if {@code supportsLDIFImport}
-   * returns {@code true}.  Note that the server will not explicitly
-   * initialize this backend before calling this method.
+   * Imports information from an LDIF file into this backend. This method should only be called if
+   * {@link #supports(BackendOperation)} with {@link BackendOperation#LDIF_IMPORT} returns
+   * {@code true}.
+   * <p>
+   * Note that the server will not explicitly initialize this backend before calling this method.
    *
-   * @param  importConfig  The configuration to use when performing the import.
-   * @param  serverContext The server context
-   * @return  Information about the result of the import processing.
-   * @throws  DirectoryException  If a problem occurs while performing
-   *                              the LDIF import.
+   * @param importConfig
+   *          The configuration to use when performing the import.
+   * @param serverContext
+   *          The server context
+   * @return Information about the result of the import processing.
+   * @throws DirectoryException
+   *           If a problem occurs while performing the LDIF import.
    */
   public abstract LDIFImportResult importLDIF(LDIFImportConfig importConfig, ServerContext serverContext)
-         throws DirectoryException;
+      throws DirectoryException;
 
   /**
    * Verify the integrity of the backend instance.
@@ -679,20 +682,18 @@
   }
 
   /**
-   * Creates a backup of the contents of this backend in a form that
-   * may be restored at a later date if necessary.  This method should
-   * only be called if {@code supportsBackup} returns {@code true}.
-   * Note that the server will not explicitly initialize this backend
-   * before calling this method.
+   * Creates a backup of the contents of this backend in a form that may be restored at a later date
+   * if necessary. This method should only be called if {@link #supports(BackendOperation)} with
+   * {@link BackendOperation#BACKUP} returns {@code true}.
+   * <p>
+   * Note that the server will not explicitly initialize this backend before calling this method.
    *
-   * @param  backupConfig  The configuration to use when performing
-   *                       the backup.
-   *
-   * @throws  DirectoryException  If a problem occurs while performing
-   *                              the backup.
+   * @param backupConfig
+   *          The configuration to use when performing the backup.
+   * @throws DirectoryException
+   *           If a problem occurs while performing the backup.
    */
-  public abstract void createBackup(BackupConfig backupConfig)
-         throws DirectoryException;
+  public abstract void createBackup(BackupConfig backupConfig) throws DirectoryException;
 
   /**
    * Removes the specified backup if it is possible to do so.
@@ -713,19 +714,17 @@
          throws DirectoryException;
 
   /**
-   * Restores a backup of the contents of this backend.  This method
-   * should only be called if {@code supportsRestore} returns
-   * {@code true}.  Note that the server will not explicitly
-   * initialize this backend before calling this method.
+   * Restores a backup of the contents of this backend. This method should only be called if
+   * {@link #supports(BackendOperation)} with {@link BackendOperation#RESTORE} returns {@code true}.
+   * <p>
+   * Note that the server will not explicitly initialize this backend before calling this method.
    *
-   * @param  restoreConfig  The configuration to use when performing
-   *                        the restore.
-   *
-   * @throws  DirectoryException  If a problem occurs while performing
-   *                              the restore.
+   * @param restoreConfig
+   *          The configuration to use when performing the restore.
+   * @throws DirectoryException
+   *           If a problem occurs while performing the restore.
    */
-  public abstract void restoreBackup(RestoreConfig restoreConfig)
-         throws DirectoryException;
+  public abstract void restoreBackup(RestoreConfig restoreConfig) throws DirectoryException;
 
   /**
    * Retrieves the unique identifier for this backend.
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/RootContainer.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/RootContainer.java
index cce1941..91907da 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/RootContainer.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/RootContainer.java
@@ -165,19 +165,6 @@
     return storage;
   }
 
-  /**
-   * Imports information from an LDIF file into this backend. This method should
-   * only be called if {@code supportsLDIFImport} returns {@code true}. <p>Note
-   * that the server will not explicitly initialize this backend before calling
-   * this method.
-   *
-   * @param importConfig
-   *          The configuration to use when performing the import.
-   * @param serverContext The server context
-   * @return information about the result of the import processing.
-   * @throws DirectoryException
-   *           If a problem occurs while performing the LDIF import.
-   */
   LDIFImportResult importLDIF(LDIFImportConfig importConfig, ServerContext serverContext) throws DirectoryException
   {//TODO JNR may call importLDIFWithSuccessiveAdds(importConfig) depending on configured import strategy
     return importLDIFWithOnDiskMerge(importConfig, serverContext);
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/backends/GenericBackendTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/backends/GenericBackendTestCase.java
index 678a6da..c4fcd5d 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/backends/GenericBackendTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/backends/GenericBackendTestCase.java
@@ -40,17 +40,11 @@
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
-/**
- * A set of generic test cases that apply to all Directory Server backends.
- */
-public class GenericBackendTestCase
-       extends BackendTestCase
+/** A set of generic test cases that apply to all Directory Server backends. */
+@SuppressWarnings("javadoc")
+public class GenericBackendTestCase extends BackendTestCase
 {
-  /**
-   * Ensures that the Directory Server is running.
-   *
-   * @throws  Exception  If an unexpected problem occurs.
-   */
+  /** Ensures that the Directory Server is running. */
   @BeforeClass
   public void startServer() throws Exception
   {
@@ -58,8 +52,6 @@
     TestCaseUtils.initializeTestBackend(true);
   }
 
-
-
   /**
    * Retrieves the backends defined in the server.
    *
@@ -68,23 +60,16 @@
   @DataProvider(name = "backends")
   public Object[][] getBackends()
   {
-    ArrayList<Backend> backendList = new ArrayList<Backend>(DirectoryServer.getBackends().values());
+    ArrayList<Backend> backendList = new ArrayList<>(DirectoryServer.getBackends().values());
     Object[][] objectArray = new Object[backendList.size()][1];
     for (int i=0; i < objectArray.length; i++)
     {
       objectArray[i][0] = backendList.get(i);
     }
-
     return objectArray;
   }
 
-
-
-  /**
-   * Tests the {@code getBaseDNs} method for the provided backend.
-   *
-   * @param  b  The backend to test.
-   */
+  /** Tests the {@link Backend#getBaseDNs} method for the provided backend. */
   @Test(dataProvider = "backends")
   public void testGetBaseDNs(Backend<?> b)
   {
@@ -93,39 +78,21 @@
     assertNotEquals(baseDNs.length, 0);
   }
 
-
-
-  /**
-   * Tests the {@code getSupportedControls} method for the provided backend.
-   *
-   * @param  b  The backend to test.
-   */
+  /** Tests the {@link Backend#getSupportedControls} method for the provided backend. */
   @Test(dataProvider = "backends")
   public void testGetSupportedControls(Backend<?> b)
   {
     assertNotNull(b.getSupportedControls());
   }
 
-
-
-  /**
-   * Tests the {@code supportsControl} method for the provided backend.
-   *
-   * @param  b  The backend to test.
-   */
+  /** Tests the supports control method for the provided backend. */
   @Test(dataProvider = "backends")
   public void testSupportsControl(Backend<?> b)
   {
     assertFalse(b.supportsControl("1.2.3.4"));
   }
 
-
-
-  /**
-   * Tests the {@code getSupportedFeatures} method for the provided backend.
-   *
-   * @param  b  The backend to test.
-   */
+  /** Tests the {@link Backend#getSupportedFeatures} method for the provided backend. */
   @Test(dataProvider = "backends")
   public void testGetSupportedFeatures(Backend<?> b)
   {
@@ -133,65 +100,35 @@
     b.getSupportedFeatures();
   }
 
-
-
-  /**
-   * Tests the {@code supportsLDIFExport} method for the provided backend.
-   *
-   * @param  b  The backend to test.
-   */
+  /** Tests the supports LDIF export method for the provided backend. */
   @Test(dataProvider = "backends")
   public void testSupportsLDIFExport(Backend<?> b)
   {
     b.supports(BackendOperation.LDIF_EXPORT);
   }
 
-
-
-  /**
-   * Tests the {@code supportsLDIFImport} method for the provided backend.
-   *
-   * @param  b  The backend to test.
-   */
+  /** Tests the supports LDIF import method for the provided backend. */
   @Test(dataProvider = "backends")
   public void testSupportsLDIFImport(Backend<?> b)
   {
     b.supports(BackendOperation.LDIF_IMPORT);
   }
 
-
-
-  /**
-   * Tests the {@code supportsBackup} method for the provided backend.
-   *
-   * @param  b  The backend to test.
-   */
+  /** Tests the supports Backup method for the provided backend. */
   @Test(dataProvider = "backends")
   public void testSupportsBackup(Backend<?> b)
   {
     b.supports(BackendOperation.BACKUP);
   }
 
-
-
-  /**
-   * Tests the {@code supportsRestore} method for the provided backend.
-   *
-   * @param  b  The backend to test.
-   */
+  /** Tests the supports restore method for the provided backend. */
   @Test(dataProvider = "backends")
   public void testSupportsRestore(Backend<?> b)
   {
     b.supports(BackendOperation.RESTORE);
   }
 
-
-
-  /**
-   * Tests the {@code getBackendID} method for the provided backend.
-   *
-   * @param  b  The backend to test.
-   */
+  /** Tests the {@link Backend#getBackendID} method for the provided backend. */
   @Test(dataProvider = "backends")
   public void testGetBackendID(Backend<?> b)
   {
@@ -199,93 +136,51 @@
     assertTrue(b.getBackendID().length() > 0);
   }
 
-
-
-  /**
-   * Tests the {@code isPrivateBackend} method for the provided backend.
-   *
-   * @param  b  The backend to test.
-   */
+  /** Tests the {@link Backend#isPrivateBackend} method for the provided backend. */
   @Test(dataProvider = "backends")
   public void testIsPrivateBackend(Backend<?> b)
   {
     b.isPrivateBackend();
   }
 
-
-
-  /**
-   * Tests the {@code getWritabilityMode} method for the provided backend.
-   *
-   * @param  b  The backend to test.
-   */
+  /** Tests the {@link Backend#getWritabilityMode} method for the provided backend. */
   @Test(dataProvider = "backends")
   public void testGetWritabilityMode(Backend<?> b)
   {
     assertNotNull(b.getWritabilityMode());
   }
 
-
-
-  /**
-   * Tests the {@code getBackendMonitor} method for the provided backend.
-   *
-   * @param  b  The backend to test.
-   */
+  /** Tests the {@link Backend#getBackendMonitor} method for the provided backend. */
   @Test(dataProvider = "backends")
   public void testGetBackendMonitor(Backend<?> b)
   {
     assertNotNull(b.getBackendMonitor());
   }
 
-
-
-  /**
-   * Tests the {@code getEntryCount} method for the provided backend.
-   *
-   * @param  b  The backend to test.
-   */
+  /** Tests the {@link Backend#getEntryCount} method for the provided backend. */
   @Test(dataProvider = "backends")
   public void testGetEntryCount(Backend<?> b)
   {
     b.getEntryCount();
   }
 
-
-
-  /**
-   * Tests the {@code getParentBackend} method for the provided backend.
-   *
-   * @param  b  The backend to test.
-   */
+  /** Tests the {@link Backend#getParentBackend} method for the provided backend. */
   @Test(dataProvider = "backends")
   public void testGetParentBackend(Backend<?> b)
   {
     b.getParentBackend();
   }
 
-
-
-  /**
-   * Tests the {@code getSubordinateBackends} method for the provided backend.
-   *
-   * @param  b  The backend to test.
-   */
+  /** Tests the {@link Backend#getSubordinateBackends} method for the provided backend. */
   @Test(dataProvider = "backends")
   public void testGetSubordinateBackends(Backend<?> b)
   {
     assertNotNull(b.getSubordinateBackends());
   }
 
-
-
   /**
-   * Tests the {@code handlesEntry} method for the provided backend for each
-   * of the declared base DNs.
-   *
-   * @param  b  The backend to test.
-   *
-   * @throws  Exception  If an unexpected problem occurs.
+   * Tests the {@link Backend#handlesEntry} method for the provided backend for each of the declared
+   * base DNs.
    */
   @Test(dataProvider = "backends")
   public void testHandlesEntry(Backend<?> b) throws Exception

--
Gitblit v1.10.0