From 39fda828273d60937eaaff4d81183855343cbc57 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Thu, 2 Mar 2023 20:36:10 +0100 Subject: [PATCH] Remove Namespace.FLOATING_ID We do not allow for dynamically-allocated IDs. Remove the constant and the corresponding special-case. JIRA: CONTROLLER-2072 Change-Id: I7de4ec77bd6934cd89c78de406cf9e0c73fa2cd4 Signed-off-by: Robert Varga --- .../main/java/io/atomix/utils/serializer/Namespace.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/third-party/atomix/storage/src/main/java/io/atomix/utils/serializer/Namespace.java b/third-party/atomix/storage/src/main/java/io/atomix/utils/serializer/Namespace.java index 186464b97c..9dcbded38b 100644 --- a/third-party/atomix/storage/src/main/java/io/atomix/utils/serializer/Namespace.java +++ b/third-party/atomix/storage/src/main/java/io/atomix/utils/serializer/Namespace.java @@ -54,11 +54,6 @@ public final class Namespace implements JournalSerdes, KryoFactory, KryoPool { */ private static final int DEFAULT_BUFFER_SIZE = 4096; - /** - * ID to use if this KryoNamespace does not define registration id. - */ - private static final int FLOATING_ID = -1; - /** * Smallest ID free to use for user defined registrations. */ @@ -245,9 +240,6 @@ public final class Namespace implements JournalSerdes, KryoFactory, KryoPool { for (RegistrationBlock block : registeredBlocks) { int id = block.begin(); - if (id == FLOATING_ID) { - id = kryo.getNextRegistrationId(); - } for (Entry[], EntrySerializer> entry : block.types()) { register(kryo, entry.getKey(), entry.getValue(), id++); } -- 2.36.6