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

Jean-Noel Rouvignac
19.57.2013 20407f942c7c974ab44d5064241784f0937bfdb6
ECLServerHandler.java:
In findCookie(), reverted an if statement to use an early exit in case of error. It improves readability by making this code consistent with the other code in this method.
1 files modified
14 ■■■■ changed files
opends/src/server/org/opends/server/replication/server/ECLServerHandler.java 14 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ECLServerHandler.java
@@ -613,16 +613,16 @@
    if (startChangeNumber < firstChangeNumber)
    {
      CNIndexRecord firstCNRecord = cnIndexDB.getRecord(firstChangeNumber);
      if (firstCNRecord != null)
      if (firstCNRecord == null)
      {
        final String crossDomainStartState = firstCNRecord.getPreviousCookie();
        cnIndexDBCursor = cnIndexDB.getCursorFrom(firstChangeNumber);
        return crossDomainStartState;
        // This should not happen
        isEndOfCNIndexDBReached = true;
        return null;
      }
      // This should not happen
      isEndOfCNIndexDBReached = true;
      return null;
      final String crossDomainStartState = firstCNRecord.getPreviousCookie();
      cnIndexDBCursor = cnIndexDB.getCursorFrom(firstChangeNumber);
      return crossDomainStartState;
    }
    else if (startChangeNumber <= lastChangeNumber)
    {