Reformat ByteArrayOutput/BufferAwareByteArrayOutputStream 71/111671/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 8 May 2024 22:34:24 +0000 (00:34 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 8 May 2024 22:35:11 +0000 (00:35 +0200)
These are simple classes, just reformat them to keep checkstyle happy.

Change-Id: I7e0331a3bd8b4373921bafb29da6362e02e57f19
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
atomix-storage/src/main/java/io/atomix/utils/serializer/BufferAwareByteArrayOutputStream.java
atomix-storage/src/main/java/io/atomix/utils/serializer/ByteArrayOutput.java

index 94fc32246e254d31dd49d54bc99f2748a45d6a98..276b390625fef0548ec232609534c191f0703fdd 100644 (file)
@@ -21,12 +21,11 @@ import java.io.ByteArrayOutputStream;
  * Exposes protected byte array length in {@link ByteArrayOutputStream}.
  */
 final class BufferAwareByteArrayOutputStream extends ByteArrayOutputStream {
+    BufferAwareByteArrayOutputStream(final int size) {
+        super(size);
+    }
 
-  BufferAwareByteArrayOutputStream(int size) {
-    super(size);
-  }
-
-  int getBufferSize() {
-    return buf.length;
-  }
+    int getBufferSize() {
+        return buf.length;
+    }
 }
index 6df25b5ef50372fb0a7a6ab1fe18e9bce935ca26..336f7894611bc691dd06352ad0268b8d3ea3b04e 100644 (file)
@@ -21,16 +21,15 @@ import com.esotericsoftware.kryo.io.Output;
  * Convenience class to avoid extra object allocation and casting.
  */
 final class ByteArrayOutput extends Output {
+    private final BufferAwareByteArrayOutputStream stream;
 
-  private final BufferAwareByteArrayOutputStream stream;
+    ByteArrayOutput(final int bufferSize, final int maxBufferSize, final BufferAwareByteArrayOutputStream stream) {
+        super(bufferSize, maxBufferSize);
+        super.setOutputStream(stream);
+        this.stream = stream;
+    }
 
-  ByteArrayOutput(final int bufferSize, final int maxBufferSize, final BufferAwareByteArrayOutputStream stream) {
-    super(bufferSize, maxBufferSize);
-    super.setOutputStream(stream);
-    this.stream = stream;
-  }
-
-  BufferAwareByteArrayOutputStream getByteArrayOutputStream() {
-    return stream;
-  }
+    BufferAwareByteArrayOutputStream getByteArrayOutputStream() {
+        return stream;
+    }
 }