Skip to content

Commit 119d578

Browse files
committed
Merge branch 'release/0.12.2-RC2'
2 parents 32bd149 + 3694844 commit 119d578

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License.
1313
#
14-
version=0.12.2-RC1
14+
version=0.12.2-RC2

rsocket-core/src/main/java/io/rsocket/frame/DataAndMetadataFlyweight.java

+3-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import io.netty.buffer.ByteBuf;
44
import io.netty.buffer.ByteBufAllocator;
55
import io.netty.buffer.Unpooled;
6-
import io.rsocket.buffer.TupleByteBuf;
76

87
class DataAndMetadataFlyweight {
98
public static final int FRAME_LENGTH_MASK = 0xFFFFFF;
@@ -33,20 +32,19 @@ private static int decodeLength(final ByteBuf byteBuf) {
3332

3433
static ByteBuf encodeOnlyMetadata(
3534
ByteBufAllocator allocator, final ByteBuf header, ByteBuf metadata) {
36-
return TupleByteBuf.of(allocator, header, metadata);
35+
return allocator.compositeBuffer().addComponents(true, header, metadata);
3736
}
3837

3938
static ByteBuf encodeOnlyData(ByteBufAllocator allocator, final ByteBuf header, ByteBuf data) {
40-
return TupleByteBuf.of(allocator, header, data);
39+
return allocator.compositeBuffer().addComponents(true, header, data);
4140
}
4241

4342
static ByteBuf encode(
4443
ByteBufAllocator allocator, final ByteBuf header, ByteBuf metadata, ByteBuf data) {
4544

4645
int length = metadata.readableBytes();
4746
encodeLength(header, length);
48-
49-
return TupleByteBuf.of(allocator, header, metadata, data);
47+
return allocator.compositeBuffer().addComponents(true, header, metadata, data);
5048
}
5149

5250
static ByteBuf metadataWithoutMarking(ByteBuf byteBuf, boolean hasMetadata) {

rsocket-core/src/main/java/io/rsocket/frame/FrameLengthFlyweight.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import io.netty.buffer.ByteBuf;
44
import io.netty.buffer.ByteBufAllocator;
5-
import io.rsocket.buffer.TupleByteBuf;
65

76
/**
87
* Some transports like TCP aren't framed, and require a length. This is used by DuplexConnections
@@ -35,7 +34,7 @@ private static int decodeLength(final ByteBuf byteBuf) {
3534
public static ByteBuf encode(ByteBufAllocator allocator, int length, ByteBuf frame) {
3635
ByteBuf buffer = allocator.buffer();
3736
encodeLength(buffer, length);
38-
return TupleByteBuf.of(allocator, buffer, frame);
37+
return allocator.compositeBuffer().addComponents(true, buffer, frame);
3938
}
4039

4140
public static int length(ByteBuf byteBuf) {

0 commit comments

Comments
 (0)