mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
26.25.2015 76cefb06b3a6dda586c3691765d39f1b5c800fc8
AutoRefactor: Fix modifiers usage
15 files modified
94 ■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/loggers/DebugLogPublisher.java 7 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/forgerock/opendj/config/server/AdminTestCaseUtils.java 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/quicksetup/TestUtilities.java 21 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/admin/TestCfg.java 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/admin/server/AdminTestCaseUtils.java 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/authorization/dseecompat/AciTestCase.java 14 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/loggers/LoggingCategoryNamesTest.java 6 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/plugins/DelayPreOpPlugin.java 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/plugins/DisconnectClientPlugin.java 6 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/plugins/ShortCircuitPlugin.java 5 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/replication/ReplicationTestCase.java 13 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/replication/server/MonitorTest.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/schema/TimeBasedMatchingRuleTest.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/tools/UpgradeTestCase.java 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/types/SearchFilterTests.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/loggers/DebugLogPublisher.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2009 Sun Microsystems, Inc.
 *      Portions Copyright 2012-2014 ForgeRock AS.
 *      Portions Copyright 2012-2015 ForgeRock AS.
 */
package org.opends.server.loggers;
@@ -282,8 +282,7 @@
   * @param  className  The class name.
   * @param  settings   The trace settings for the class.
   */
  private synchronized final void setClassSettings(String className,
                                       TraceSettings settings)
  private final synchronized void setClassSettings(String className, TraceSettings settings)
  {
    if (classTraceSettings == null)
    {
@@ -301,7 +300,7 @@
   * @param  methodName  The method name.
   * @param  settings    The trace settings for the method.
   */
  private synchronized final void setMethodSettings(String className,
  private final synchronized void setMethodSettings(String className,
      String methodName, TraceSettings settings)
  {
    if (methodTraceSettings == null) {
opendj-server-legacy/src/test/java/org/forgerock/opendj/config/server/AdminTestCaseUtils.java
@@ -104,7 +104,7 @@
  // Construct a dummy path.
  private synchronized static <C extends ConfigurationClient, S extends Configuration>
  private static synchronized <C extends ConfigurationClient, S extends Configuration>
  ManagedObjectPath<C, S> getPath(AbstractManagedObjectDefinition<C, S> d) {
    if (!isProfileRegistered) {
      LDAPProfile.Wrapper profile = new LDAPProfile.Wrapper() {
opendj-server-legacy/src/test/java/org/opends/quicksetup/TestUtilities.java
@@ -55,7 +55,7 @@
  private static boolean initialized;
  static public void initServer()
  public static void initServer()
          throws IOException, ApplicationException, InterruptedException {
    File qsServerRoot = getQuickSetupTestServerRootDir();
    if (!initialized) {
@@ -70,22 +70,19 @@
    }
  }
  static public Installation getInstallation() {
  public static Installation getInstallation() {
    return new Installation(getQuickSetupTestServerRootDir(),getQuickSetupTestServerRootDir());
  }
  static private void setupServer() throws IOException, InterruptedException {
  private static void setupServer() throws IOException, InterruptedException {
    int[] ports = TestCaseUtils.findFreePorts(2);
    ldapPort = ports[0];
    jmxPort = ports[1];
    List<String> args = new ArrayList<String>();
    File root = getQuickSetupTestServerRootDir();
    if (OperatingSystem.isUnixBased()) {
      args.add(new File(root, "setup").getPath());
    } else {
      args.add(new File(root, "setup.bat").getPath());
    }
    String filename = OperatingSystem.isUnixBased() ? "setup" : "setup.bat";
    args.add(new File(root, filename).getPath());
    args.add("--cli");
    args.add("-n");
    args.add("-p");
@@ -112,12 +109,12 @@
    }
  }
  static public void stopServer() throws ApplicationException {
  public static void stopServer() throws ApplicationException {
    ServerController controller = new ServerController(getInstallation());
    controller.stopServer();
  }
  static public File getInstallPackageFile() throws FileNotFoundException {
  public static File getInstallPackageFile() throws FileNotFoundException {
    File installPackageFile = null;
    String buildRoot = System.getProperty(PROPERTY_BUILD_ROOT);
    File   buildDir  = new File(buildRoot, "build");
@@ -140,14 +137,14 @@
    return installPackageFile;
  }
  static public File getQuickSetupTestWorkspace() {
  public static File getQuickSetupTestWorkspace() {
    String buildRoot = System.getProperty(PROPERTY_BUILD_ROOT);
    File   buildDir  = new File(buildRoot, "build");
    File   unitRootDir  = new File(buildDir, "unit-tests");
    return new File(unitRootDir, "quicksetup");
  }
  static public File getQuickSetupTestServerRootDir() {
  public static File getQuickSetupTestServerRootDir() {
    return new File(getQuickSetupTestWorkspace(), "OpenDS");
  }
}
opendj-server-legacy/src/test/java/org/opends/server/admin/TestCfg.java
@@ -89,7 +89,7 @@
   * @throws Exception
   *           If an unexpected error occurred.
   */
  public synchronized static void setUp() throws Exception {
  public static synchronized void setUp() throws Exception {
    if (TEST_PARENT_OCD == null) {
      String ocd = "( 1.3.6.1.4.1.26027.1.2.4455114401 "
          + "NAME 'ds-cfg-test-parent-dummy' "
opendj-server-legacy/src/test/java/org/opends/server/admin/server/AdminTestCaseUtils.java
@@ -108,7 +108,7 @@
  // Construct a dummy path.
  private synchronized static <C extends ConfigurationClient, S extends Configuration>
  private static synchronized <C extends ConfigurationClient, S extends Configuration>
  ManagedObjectPath<C, S> getPath(AbstractManagedObjectDefinition<C, S> d) {
    if (!isProfileRegistered) {
      LDAPProfile.Wrapper profile = new LDAPProfile.Wrapper() {
opendj-server-legacy/src/test/java/org/opends/server/authorization/dseecompat/AciTestCase.java
@@ -124,16 +124,16 @@
          "ldap://kansashost/OU=People,O=Kansas,C=US";
  //GLOBAL ACIs
  protected final static String G_READ_ACI =
  protected static final String G_READ_ACI =
          "(targetattr!=\"userPassword||authPassword\")" +
                  "(version 3.0; acl \"Anonymous read access\";" +
                  "allow (read,search,compare) userdn=\"ldap:///anyone\";)";
  protected final static String G_SELF_MOD =
  protected static final String G_SELF_MOD =
          "(targetattr=\"*\")(version 3.0; acl \"Self entry modification\";" +
                  "allow (write) userdn=\"ldap:///self\";)";
  protected final static String G_SCHEMA =
  protected static final String G_SCHEMA =
          "(target=\"ldap:///cn=schema\")(targetscope=\"base\")" +
          "(targetattr=\"attributeTypes||dITContentRules||dITStructureRules||" +
                  "ldapSyntaxes||matchingRules||matchingRuleUse||nameForms||" +
@@ -141,7 +141,7 @@
          "(version 3.0; acl \"User-Visible Schema Operational Attributes\";" +
                  "allow (read,search,compare) userdn=\"ldap:///anyone\";)";
  protected final static String G_DSE =
  protected static final String G_DSE =
          "(target=\"ldap:///\")(targetscope=\"base\")" +
               "(targetattr=\"namingContexts||supportedAuthPasswordSchemes||" +
                  "supportedControl||supportedExtension||supportedFeatures||" +
@@ -149,18 +149,18 @@
        "(version 3.0; acl \"User-Visible Root DSE Operational Attributes\"; " +
                  "allow (read,search,compare) userdn=\"ldap:///anyone\";)";
  protected final static String G_USER_OPS =
  protected static final String G_USER_OPS =
          "(targetattr=\"createTimestamp||creatorsName||modifiersName||" +
                  "modifyTimestamp||entryDN||entryUUID||subschemaSubentry\")" +
                 "(version 3.0; acl \"User-Visible Operational Attributes\"; " +
                  "allow (read,search,compare) userdn=\"ldap:///anyone\";)";
  protected final static String G_CONTROL =
  protected static final String G_CONTROL =
          "(targetcontrol = \"*\")" +
          "(version 3.0; acl \"Anonymous control access\"; " +
                  "allow (read) userdn=\"ldap:///anyone\";)";
  protected final static String E_EXTEND_OP =
  protected static final String E_EXTEND_OP =
          "(extop = \"*\")" +
          "(version 3.0; acl \"Anonymous extend op access\"; " +
                  "allow (read) userdn=\"ldap:///anyone\";)";
opendj-server-legacy/src/test/java/org/opends/server/loggers/LoggingCategoryNamesTest.java
@@ -21,7 +21,7 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2014 ForgeRock AS.
 *      Copyright 2014-2015 ForgeRock AS.
 */
package org.opends.server.loggers;
@@ -35,8 +35,8 @@
@SuppressWarnings("javadoc")
public class LoggingCategoryNamesTest extends DirectoryServerTestCase
{
  private final static String CORE_PACKAGE = DirectoryServer.class.getPackage().getName();
  private final static String CORE_PACKAGE_NAME = "CORE";
  private static final String CORE_PACKAGE = DirectoryServer.class.getPackage().getName();
  private static final String CORE_PACKAGE_NAME = "CORE";
  @DataProvider
  public Object[][] matchingNames()
opendj-server-legacy/src/test/java/org/opends/server/plugins/DelayPreOpPlugin.java
@@ -74,7 +74,7 @@
    /**
     * ControlDecoder implementation to decode this control from a ByteString.
     */
    private final static class Decoder
    private static final class Decoder
        implements ControlDecoder<DelayRequestControl>
    {
      /**
opendj-server-legacy/src/test/java/org/opends/server/plugins/DisconnectClientPlugin.java
@@ -87,16 +87,14 @@
    /**
     * ControlDecoder implementation to decode this control from a ByteString.
     */
    private final static class Decoder
    private static final class Decoder
        implements ControlDecoder<DisconnectClientControl>
    {
      /**
       * {@inheritDoc}
       */
      @Override
      public DisconnectClientControl decode(boolean isCritical,
                                            ByteString value)
          throws DirectoryException
      public DisconnectClientControl decode(boolean isCritical, ByteString value) throws DirectoryException
      {
        return new DisconnectClientControl(isCritical, value.toString());
      }
opendj-server-legacy/src/test/java/org/opends/server/plugins/ShortCircuitPlugin.java
@@ -77,15 +77,14 @@
    /**
     * ControlDecoder implementation to decode this control from a ByteString.
     */
    private final static class Decoder
    private static final class Decoder
        implements ControlDecoder<ShortCircuitRequestControl>
    {
      /**
       * {@inheritDoc}
       */
      @Override
      public ShortCircuitRequestControl decode(boolean isCritical,
                                               ByteString value)
      public ShortCircuitRequestControl decode(boolean isCritical, ByteString value)
          throws DirectoryException
      {
        ASN1Reader reader = ASN1.getReader(value);
opendj-server-legacy/src/test/java/org/opends/server/replication/ReplicationTestCase.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2006-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2011-2014 ForgeRock AS
 *      Portions Copyright 2011-2015 ForgeRock AS
 */
package org.opends.server.replication;
@@ -193,20 +193,19 @@
   * @param baseDN The baseDN for which we want the generationId
   * @return The value of the generationId.
   */
  static protected long getGenerationId(DN baseDN)
  protected static long getGenerationId(DN baseDN)
  {
    // This is the value of the generationId computed by the server when the
    // test suffix (o=test) has only the root entry created.
    long genId = TEST_DN_WITH_ROOT_ENTRY_GENID;
    try
    {
      LDAPReplicationDomain replDomain = LDAPReplicationDomain.retrievesReplicationDomain(baseDN);
      genId = replDomain.getGenerationID();
      return replDomain.getGenerationID();
    }
    catch(Exception e) {
      logger.traceException(e);
    }
    return genId;
    // This is the value of the generationId computed by the server when the
    // test suffix (o=test) has only the root entry created.
    return TEST_DN_WITH_ROOT_ENTRY_GENID;
  }
  /**
opendj-server-legacy/src/test/java/org/opends/server/replication/server/MonitorTest.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2008-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2011-2014 ForgeRock AS
 *      Portions Copyright 2011-2015 ForgeRock AS
 */
package org.opends.server.replication.server;
@@ -263,7 +263,7 @@
        + "userPassword: password\n" + "initials: AA\n";
  }
  static private ReplicationMsg createAddMsg(CSN csn) throws Exception
  private static ReplicationMsg createAddMsg(CSN csn) throws Exception
  {
    Entry personWithUUIDEntry = null;
    String user1entryUUID;
opendj-server-legacy/src/test/java/org/opends/server/schema/TimeBasedMatchingRuleTest.java
@@ -66,8 +66,8 @@
  private DN user5;
  private DN user6;
  private final static String TIME_ATTR = "test-time";
  private final static String DATE_ATTR = "test-date";
  private static final String TIME_ATTR = "test-time";
  private static final String DATE_ATTR = "test-date";
  /**
opendj-server-legacy/src/test/java/org/opends/server/tools/UpgradeTestCase.java
@@ -49,7 +49,7 @@
@SuppressWarnings("javadoc")
public class UpgradeTestCase extends ToolsTestCase
{
  private final static String configFilePath = DirectoryServer.getInstanceRoot()
  private static final String configFilePath = DirectoryServer.getInstanceRoot()
      + File.separator + "config" + File.separator + "config.ldif";
  /**
opendj-server-legacy/src/test/java/org/opends/server/types/SearchFilterTests.java
@@ -23,7 +23,7 @@
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2013-2014 Manuel Gaupp
 *      Portions Copyright 2014 ForgeRock AS
 *      Portions Copyright 2014-2015 ForgeRock AS
 */
package org.opends.server.types;
@@ -457,7 +457,7 @@
  ////////////////////////////////////////////////////////////////////////////
  private static final String makeSimpleLdif(String givenname, String sn) {
  private static String makeSimpleLdif(String givenname, String sn) {
    String cn = givenname + " " + sn;
    return TestCaseUtils.makeLdif(
          "dn: cn=" + cn + ",dc=example,dc=com",