File tree 1 file changed +10
-8
lines changed
src/main/java/com/rabbitmq/stream/codec
1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 18
18
import com .rabbitmq .stream .Message ;
19
19
import com .rabbitmq .stream .MessageBuilder ;
20
20
import com .rabbitmq .stream .Properties ;
21
+ import edu .umd .cs .findbugs .annotations .SuppressFBWarnings ;
21
22
import java .nio .ByteBuffer ;
22
23
import java .util .*;
23
24
import java .util .function .Function ;
@@ -637,28 +638,29 @@ public Message copy() {
637
638
638
639
// from
639
640
// 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 {
641
642
642
- public static final int DEFAULT_CAPACITY = 4 * 1024 ;
643
+ static final int DEFAULT_CAPACITY = 4 * 1024 ;
643
644
644
- byte [] buffer ;
645
- int position ;
645
+ private byte [] buffer ;
646
+ private int position ;
646
647
647
648
/** Creates a new WritableBuffer with default capacity. */
648
- public ByteArrayWritableBuffer () {
649
+ ByteArrayWritableBuffer () {
649
650
this (DEFAULT_CAPACITY );
650
651
}
651
652
652
653
/** Create a new WritableBuffer with the given capacity. */
653
- public ByteArrayWritableBuffer (int capacity ) {
654
+ ByteArrayWritableBuffer (int capacity ) {
654
655
this .buffer = new byte [capacity ];
655
656
}
656
657
657
- public byte [] getArray () {
658
+ @ SuppressFBWarnings ("EI_EXPOSE_REP" )
659
+ byte [] getArray () {
658
660
return buffer ;
659
661
}
660
662
661
- public int getArrayLength () {
663
+ int getArrayLength () {
662
664
return position ;
663
665
}
664
666
You can’t perform that action at this time.
0 commit comments