File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
src/main/java/com/rabbitmq/stream/codec Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 1818import com .rabbitmq .stream .Message ;
1919import com .rabbitmq .stream .MessageBuilder ;
2020import com .rabbitmq .stream .Properties ;
21+ import edu .umd .cs .findbugs .annotations .SuppressFBWarnings ;
2122import java .nio .ByteBuffer ;
2223import java .util .*;
2324import java .util .function .Function ;
@@ -637,28 +638,29 @@ public Message copy() {
637638
638639 // from
639640 // https://github.com/apache/activemq/blob/master/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/message/AmqpWritableBuffer.java
640- protected static class ByteArrayWritableBuffer implements WritableBuffer {
641+ static class ByteArrayWritableBuffer implements WritableBuffer {
641642
642- public static final int DEFAULT_CAPACITY = 4 * 1024 ;
643+ static final int DEFAULT_CAPACITY = 4 * 1024 ;
643644
644- byte [] buffer ;
645- int position ;
645+ private byte [] buffer ;
646+ private int position ;
646647
647648 /** Creates a new WritableBuffer with default capacity. */
648- public ByteArrayWritableBuffer () {
649+ ByteArrayWritableBuffer () {
649650 this (DEFAULT_CAPACITY );
650651 }
651652
652653 /** Create a new WritableBuffer with the given capacity. */
653- public ByteArrayWritableBuffer (int capacity ) {
654+ ByteArrayWritableBuffer (int capacity ) {
654655 this .buffer = new byte [capacity ];
655656 }
656657
657- public byte [] getArray () {
658+ @ SuppressFBWarnings ("EI_EXPOSE_REP" )
659+ byte [] getArray () {
658660 return buffer ;
659661 }
660662
661- public int getArrayLength () {
663+ int getArrayLength () {
662664 return position ;
663665 }
664666
You can’t perform that action at this time.
0 commit comments