diff --git a/src/main/java/net/openhft/chronicle/map/ReplicatedChronicleMap.java b/src/main/java/net/openhft/chronicle/map/ReplicatedChronicleMap.java index 6ca4a1bcc..9348e0c09 100644 --- a/src/main/java/net/openhft/chronicle/map/ReplicatedChronicleMap.java +++ b/src/main/java/net/openhft/chronicle/map/ReplicatedChronicleMap.java @@ -87,7 +87,6 @@ final class ReplicatedChronicleMap, // for file, jdbc and UDP replication public static final int RESERVED_MOD_ITER = 8; public static final int ADDITIONAL_ENTRY_BYTES = 10; - static final int MAX_UNSIGNED_SHORT = Character.MAX_VALUE; private static final long serialVersionUID = 0L; private static final Logger LOG = LoggerFactory.getLogger(ReplicatedChronicleMap.class); private static final long LAST_UPDATED_HEADER_SIZE = 128L * 8L; @@ -632,12 +631,13 @@ final class ReplicatedChronicleMap, keySizeMarshaller.sizeEncodingSize(keySize) + keySize + ADDITIONAL_ENTRY_BYTES + valueSizeMarshaller.sizeEncodingSize(valueSize)) + valueSize; // replication enforces that the entry size will never be larger than an unsigned short - if (result > MAX_UNSIGNED_SHORT) + if (result > Integer.MAX_VALUE) throw new IllegalStateException("ENTRY WRITE_BUFFER_SIZE TOO LARGE : Replicated " + "ChronicleMap's" + " are restricted to an " + - "entry size of " + MAX_UNSIGNED_SHORT + ", " + + "entry size of " + Integer.MAX_VALUE + ", " + "your entry size=" + result); + return result; } diff --git a/src/main/java/net/openhft/chronicle/map/TcpReplicator.java b/src/main/java/net/openhft/chronicle/map/TcpReplicator.java index bab8a8b8d..ab4d0ed7f 100644 --- a/src/main/java/net/openhft/chronicle/map/TcpReplicator.java +++ b/src/main/java/net/openhft/chronicle/map/TcpReplicator.java @@ -1052,7 +1052,6 @@ final class TcpReplicator extends AbstractChannelReplicator implements Closeable final int inPosition = in.position(); - long outPosition = out.position(); long outLimit = out.limit(); @@ -1792,7 +1791,6 @@ class StatelessServerConnector { /** * write the keysize and the key to the the {@code target} buffer * - * @param local * @param key the key of the map */ @@ -1855,7 +1853,7 @@ class StatelessServerConnector { private long header(Bytes writer, final long transactionId) { final long sizeLocation = writer.position(); - writer.skip(TRANSACTION_ID_OFFSET); // SIZE_OF_SIZE + is + writer.skip(TRANSACTION_ID_OFFSET); // exception writer.writeLong(transactionId);