OPENDJ-1134 (CR-2355) Introduce a class in replication for encapsulating host+port combinations
Fixed a regression introduced in r9605: It was found by Christophe Sovant with the functional test suite.
Partial revert of r9605:
Using DN.toNormalizedString() should have been only done for replication metadata, not for user data because OpenDJ stores and returns data like provided by users.
| | |
| | | AddOperation add = new AddOperationBasis(connection, |
| | | InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, |
| | | ByteString.valueOf(newDN.toNormalizedString()), attr); |
| | | AddContext ctx = new AddContext(getCSN(), getEntryUUID(), |
| | | parentEntryUUID); |
| | | ByteString.valueOf(newDN.toString()), attr); |
| | | AddContext ctx = new AddContext(getCSN(), getEntryUUID(), parentEntryUUID); |
| | | add.setAttachment(SYNCHROCONTEXT, ctx); |
| | | return add; |
| | | } |
| | |
| | | public byte[] encodeHeader(byte type, int additionalLength, short version) |
| | | throws UnsupportedEncodingException |
| | | { |
| | | byte[] byteDn = dn.toNormalizedString().getBytes("UTF-8"); |
| | | byte[] byteDn = dn.toString().getBytes("UTF-8"); |
| | | byte[] csnByte = getCSN().toString().getBytes("UTF-8"); |
| | | byte[] byteEntryuuid = getEntryUUID().getBytes("UTF-8"); |
| | | |
| | |
| | | public byte[] encodeHeader_V1(byte type, int additionalLength) |
| | | throws UnsupportedEncodingException |
| | | { |
| | | byte[] byteDn = dn.toNormalizedString().getBytes("UTF-8"); |
| | | byte[] byteDn = dn.toString().getBytes("UTF-8"); |
| | | byte[] csnByte = getCSN().toString().getBytes("UTF-8"); |
| | | byte[] byteEntryuuid = getEntryUUID().getBytes("UTF-8"); |
| | | |
| | |
| | | ModifyDNOperation moddn = new ModifyDNOperationBasis(connection, |
| | | InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, |
| | | ByteString.valueOf(newDN.toNormalizedString()), |
| | | ByteString.valueOf(newDN.toString()), |
| | | ByteString.valueOf(newRDN), |
| | | deleteOldRdn, |
| | | (newSuperior == null ? null : ByteString.valueOf(newSuperior))); |
| | |
| | | ModifyOperation mod = new ModifyOperationBasis(connection, |
| | | InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, |
| | | ByteString.valueOf(newDN.toNormalizedString()), ldapmods); |
| | | ByteString.valueOf(newDN.toString()), ldapmods); |
| | | ModifyContext ctx = new ModifyContext(getCSN(), getEntryUUID()); |
| | | mod.setAttachment(SYNCHROCONTEXT, ctx); |
| | | return mod; |