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

pgamba
13.42.2007 3a000519213f3fdc296662d699f5849a6481ee65
Fix 2588 - step 2 - NullPointer exception when enabling replication
2 files modified
25 ■■■■■ changed files
opends/src/server/org/opends/server/replication/server/ReplicationBackend.java 16 ●●●●● patch | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ReplicationServerTest.java 9 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationBackend.java
@@ -328,6 +328,22 @@
  @Override()
  public synchronized long getEntryCount()
  {
    if (server==null)
    {
      try
      {
        server = retrievesReplicationServer();
        if (server == null)
        {
          return 0;
        }
      }
      catch(Exception e)
      {
        return 0;
      }
    }
    //This method only returns the number of actual change entries, the
    //domain and any baseDN entries are not counted.
    long retNum=0;
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ReplicationServerTest.java
@@ -1229,6 +1229,14 @@
   {
     debugInfo("Starting searchBackend");
     // General search
     InternalSearchOperation op2 = connection.processSearch(
         new ASN1OctetString("cn=monitor"),
         SearchScope.WHOLE_SUBTREE,
         LDAPFilter.decode("(objectclass=*)"));
     assertEquals(op2.getResultCode(), ResultCode.SUCCESS,
         op2.getErrorMessage().toString());
     replicationServer.clearDb();
     LDIFWriter ldifWriter = null;
@@ -1291,6 +1299,7 @@
         LDAPFilter.decode("(changetype=*)"));
     assertEquals(op.getResultCode(), ResultCode.NO_SUCH_OBJECT);
     // General search
     op = connection.processSearch(
         new ASN1OctetString("dc=replicationChanges"),