Rename patched ByteBufferInput 08/111008/5
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 25 Mar 2024 08:47:22 +0000 (09:47 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 25 Mar 2024 13:15:16 +0000 (14:15 +0100)
Hide the patched version and renake it to Kryo505ByteBufferInput.

JIRA: CONTROLLER-2109
Change-Id: Ie2b50dab13f1ae93e343f18acf4a05a890616576
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
atomix-storage/src/main/java/io/atomix/utils/serializer/Kryo505ByteBufferInput.java [moved from atomix-storage/src/main/java/io/atomix/utils/serializer/ByteBufferInput.java with 97% similarity]
atomix-storage/src/main/java/io/atomix/utils/serializer/KryoJournalSerdes.java

similarity index 97%
rename from atomix-storage/src/main/java/io/atomix/utils/serializer/ByteBufferInput.java
rename to atomix-storage/src/main/java/io/atomix/utils/serializer/Kryo505ByteBufferInput.java
index 515572ca819606c38ec97c84dc66f7a9a8e0a453..ed66011aba799523c3f931e66eacf0530e6c0f08 100644 (file)
@@ -19,6 +19,7 @@
 
 package io.atomix.utils.serializer;
 
+import com.esotericsoftware.kryo.io.ByteBufferInput;
 import java.nio.ByteBuffer;
 
 /**
@@ -28,8 +29,8 @@ import java.nio.ByteBuffer;
  * @author Roman Levenstein &lt;romixlev@gmail.com&gt;
  * @author Robert Varga
  */
-public class ByteBufferInput extends com.esotericsoftware.kryo.io.ByteBufferInput {
-       public ByteBufferInput (ByteBuffer buffer) {
+public final class Kryo505ByteBufferInput extends ByteBufferInput {
+       Kryo505ByteBufferInput (ByteBuffer buffer) {
                super(buffer);
        }
 
index c84dd2086ca6048ebfba497f4509c74bf0b82a81..64f35389c13f0ebba05244fb9dbda96fccc4fe2e 100644 (file)
@@ -21,6 +21,7 @@ import static java.util.Objects.requireNonNull;
 import com.esotericsoftware.kryo.Kryo;
 import com.esotericsoftware.kryo.Registration;
 import com.esotericsoftware.kryo.Serializer;
+import com.esotericsoftware.kryo.io.ByteBufferInput;
 import com.esotericsoftware.kryo.io.ByteBufferOutput;
 import com.esotericsoftware.kryo.pool.KryoCallback;
 import com.esotericsoftware.kryo.pool.KryoFactory;
@@ -145,7 +146,7 @@ final class KryoJournalSerdes implements JournalSerdes, KryoFactory, KryoPool {
         Kryo kryo = borrow();
         try {
             @SuppressWarnings("unchecked")
-            T obj = (T) kryo.readClassAndObject(new ByteBufferInput(buffer));
+            T obj = (T) kryo.readClassAndObject(new Kryo505ByteBufferInput(buffer));
             return obj;
         } finally {
             release(kryo);
@@ -162,7 +163,7 @@ final class KryoJournalSerdes implements JournalSerdes, KryoFactory, KryoPool {
         Kryo kryo = borrow();
         try {
             @SuppressWarnings("unchecked")
-            T obj = (T) kryo.readClassAndObject(new com.esotericsoftware.kryo.io.ByteBufferInput(stream, bufferSize));
+            T obj = (T) kryo.readClassAndObject(new ByteBufferInput(stream, bufferSize));
             return obj;
         } finally {
             release(kryo);