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

Valery Kharseko
3 days ago 74fe31b8864568224d9461e712d8e34e8eb8ba97
opendj-server-legacy/src/main/java/org/opends/server/replication/protocol/TopologyMsg.java
@@ -70,25 +70,25 @@
    // Read the DS info entries, first read number of them
    int nDsInfo = scanner.nextByte();
    final Map<Integer, DSInfo> replicaInfos = new HashMap<>(Math.max(0, nDsInfo));
    final Map<Integer, DSInfo> newReplicaInfos = new HashMap<>(Math.max(0, nDsInfo));
    while (nDsInfo > 0 && !scanner.isEmpty())
    {
      final DSInfo dsInfo = nextDSInfo(scanner, version);
      replicaInfos.put(dsInfo.getDsId(), dsInfo);
      newReplicaInfos.put(dsInfo.getDsId(), dsInfo);
      nDsInfo--;
    }
    // Read the RS info entries
    int nRsInfo = scanner.nextByte();
    final List<RSInfo> rsInfos = new ArrayList<>(Math.max(0, nRsInfo));
    final List<RSInfo> newRsInfos = new ArrayList<>(Math.max(0, nRsInfo));
    while (nRsInfo > 0 && !scanner.isEmpty())
    {
      rsInfos.add(nextRSInfo(scanner, version));
      newRsInfos.add(nextRSInfo(scanner, version));
      nRsInfo--;
    }
    this.replicaInfos = Collections.unmodifiableMap(replicaInfos);
    this.rsInfos = Collections.unmodifiableList(rsInfos);
    this.replicaInfos = Collections.unmodifiableMap(newReplicaInfos);
    this.rsInfos = Collections.unmodifiableList(newRsInfos);
  }
  private DSInfo nextDSInfo(ByteArrayScanner scanner, short version)