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

Jean-Noel Rouvignac
01.39.2014 99780b28df06361df5858f7f590c29ddfb8bf4d6
Removed useless "TODO Auto-generated method stub" comments.

Removed MultimasterReplicationFakeConf and replaced it with a mock.
1 files deleted
5 files modified
262 ■■■■ changed files
opendj3-server-dev/src/server/org/opends/server/backends/jeb/ApproximateIndexer.java 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/backends/jeb/EqualityIndexer.java 7 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/backends/jeb/OrderingIndexer.java 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/backends/jeb/SubstringIndexer.java 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/MultimasterReplicationFakeConf.java 190 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/StateMachineTest.java 50 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/backends/jeb/ApproximateIndexer.java
@@ -46,7 +46,7 @@
  /**
   * The attribute type approximate matching rule.
   */
  private MatchingRule approximateRule;
  private final MatchingRule approximateRule;
  /**
   * Create a new attribute approximate indexer for the given index
@@ -63,8 +63,7 @@
  @Override
  public String getIndexID()
  {
    // TODO Auto-generated method stub
    throw new RuntimeException();
    throw new RuntimeException("Code is not implemented");
  }
  /** {@inheritDoc} */
opendj3-server-dev/src/server/org/opends/server/backends/jeb/EqualityIndexer.java
@@ -33,8 +33,8 @@
import org.forgerock.opendj.ldap.DecodeException;
import org.forgerock.opendj.ldap.schema.Schema;
import org.forgerock.opendj.ldap.spi.IndexingOptions;
import org.opends.server.api.MatchingRule;
import org.opends.server.api.ExtensibleIndexer;
import org.opends.server.api.MatchingRule;
import org.opends.server.types.AttributeType;
/**
@@ -47,7 +47,7 @@
   * The attribute type equality matching rule which is also the
   * comparator for the index keys generated by this class.
   */
  private MatchingRule equalityRule;
  private final MatchingRule equalityRule;
  /**
   * Create a new attribute equality indexer for the given index configuration.
@@ -63,8 +63,7 @@
  @Override
  public String getIndexID()
  {
    // TODO Auto-generated method stub
    throw new RuntimeException();
    throw new RuntimeException("Code is not implemented");
  }
  /** {@inheritDoc} */
opendj3-server-dev/src/server/org/opends/server/backends/jeb/OrderingIndexer.java
@@ -47,7 +47,7 @@
   * The attribute type ordering matching rule which is also the
   * comparator for the index keys generated by this class.
   */
  private MatchingRule orderingRule;
  private final MatchingRule orderingRule;
  /**
@@ -64,8 +64,7 @@
  @Override
  public String getIndexID()
  {
    // TODO Auto-generated method stub
    throw new RuntimeException();
    throw new RuntimeException("Code is not implemented");
  }
  /** {@inheritDoc} */
opendj3-server-dev/src/server/org/opends/server/backends/jeb/SubstringIndexer.java
@@ -43,7 +43,7 @@
public class SubstringIndexer extends ExtensibleIndexer
{
  private MatchingRule substringRule;
  private final MatchingRule substringRule;
  /**
   * Create a new attribute substring indexer for the given index configuration.
@@ -60,8 +60,7 @@
  @Override
  public String getIndexID()
  {
    // TODO Auto-generated method stub
    throw new RuntimeException();
    throw new RuntimeException("Code is not implemented");
  }
  /** {@inheritDoc} */
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/MultimasterReplicationFakeConf.java
File was deleted
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/StateMachineTest.java
@@ -34,12 +34,13 @@
import java.util.concurrent.atomic.AtomicBoolean;
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.i18n.slf4j.LocalizedLogger;
import org.opends.server.TestCaseUtils;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.ReplicationSynchronizationProviderCfg;
import org.opends.server.admin.std.server.SynchronizationProviderCfg;
import org.opends.server.api.SynchronizationProvider;
import org.opends.server.core.DirectoryServer;
import org.forgerock.i18n.slf4j.LocalizedLogger;
import org.opends.server.replication.ReplicationTestCase;
import org.opends.server.replication.common.CSNGenerator;
import org.opends.server.replication.common.DSInfo;
@@ -57,6 +58,7 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import static org.mockito.Mockito.*;
import static org.opends.server.TestCaseUtils.*;
import static org.testng.Assert.*;
@@ -68,7 +70,8 @@
public class StateMachineTest extends ReplicationTestCase
{
  private static final String EXAMPLE_DN = "dc=example,dc=com";  // Server id definitions
  /** Server id definitions. */
  private static final String EXAMPLE_DN = "dc=example,dc=com";
  private static DN EXAMPLE_DN_;
  private static final int DS1_ID = 1;
@@ -82,7 +85,7 @@
  private ReplicationServer rs1;
  /** The tracer object for the debug logger */
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  private int initWindow = 100;
  private final int initWindow = 100;
  private void debugInfo(String s)
  {
@@ -193,8 +196,7 @@
   * server
   */
  @SuppressWarnings("unchecked")
  private LDAPReplicationDomain createReplicationDomain(int dsId)
      throws Exception
  private LDAPReplicationDomain createReplicationDomain(int dsId) throws Exception
  {
    SortedSet<String> replServers = new TreeSet<String>();
    replServers.add("localhost:" + rs1Port);
@@ -206,9 +208,9 @@
        DirectoryServer.getSynchronizationProviders().get(0);
    if (provider instanceof ConfigurationChangeListener)
    {
      ConfigurationChangeListener<MultimasterReplicationFakeConf> mmr =
          (ConfigurationChangeListener<MultimasterReplicationFakeConf>) provider;
      mmr.applyConfigurationChange(new MultimasterReplicationFakeConf());
      ConfigurationChangeListener<ReplicationSynchronizationProviderCfg> mmr =
          (ConfigurationChangeListener<ReplicationSynchronizationProviderCfg>) provider;
      mmr.applyConfigurationChange(mock(ReplicationSynchronizationProviderCfg.class));
    }
    return replicationDomain;
@@ -730,12 +732,14 @@
  private class BrokerInitializer
  {
    private ReplicationBroker rb = null;
    private ReplicationBroker rb;
    private int serverId = -1;
    private long userId = 0;
    private int destId = -1; // Server id of server to initialize
    private long nEntries = -1; // Number of entries to send to dest
    private boolean createReader = false;
    private long userId;
    /** Server id of server to initialize. */
    private int destId = -1;
    /** Number of entries to send to dest. */
    private long nEntries = -1;
    private boolean createReader;
    /**
     * If the BrokerInitializer is to be used for a lot of entries to send
@@ -744,7 +748,7 @@
     * he wants. If not enabled, the user is responsible to call the receive
     * method of the broker himself.
     */
    private BrokerReader reader = null;
    private BrokerReader reader;
    /**
     * Creates a broker initializer. Also creates a reader according to request
@@ -850,11 +854,11 @@
  private class BrokerWriter extends Thread
  {
    private ReplicationBroker rb = null;
    private ReplicationBroker rb;
    private int serverId = -1;
    private long userId = 0;
    private long userId;
    private AtomicBoolean shutdown = new AtomicBoolean(false);
    /** The writer starts suspended */
    /** The writer starts suspended. */
    private AtomicBoolean suspended = new AtomicBoolean(true);
    /**
     * Tells a sending session is finished. A session is sending messages
@@ -862,11 +866,11 @@
     * method runs.
     */
    private AtomicBoolean sessionDone = new AtomicBoolean(true);
    private boolean careAboutAmountOfChanges = false;
    /** Number of sent changes */
    private int nChangesSent = 0;
    private int nChangesSentLimit = 0;
    CSNGenerator gen = null;
    private boolean careAboutAmountOfChanges;
    /** Number of sent changes. */
    private int nChangesSent;
    private int nChangesSentLimit;
    private CSNGenerator gen;
    private Object sleeper = new Object();
    /**
     * If the BrokerWriter is to be used for a lot of changes to send (which is
@@ -875,7 +879,7 @@
     * If not enabled, the user is responsible to call the receive method of
     * the broker himself.
     */
    private BrokerReader reader = null;
    private BrokerReader reader;
    /** Creates a broker writer. Also creates a reader according to request */
    public BrokerWriter(ReplicationBroker rb, int serverId,