diff --git a/runtime/src/main/java/org/capnproto/WireHelpers.java b/runtime/src/main/java/org/capnproto/WireHelpers.java index 95ebf0bc..08370ba4 100644 --- a/runtime/src/main/java/org/capnproto/WireHelpers.java +++ b/runtime/src/main/java/org/capnproto/WireHelpers.java @@ -850,11 +850,7 @@ static Data.Builder setDataPointer(int refOffset, SegmentBuilder segment, Data.Reader value) { Data.Builder builder = initDataPointer(refOffset, segment, value.size); - - // TODO is there a way to do this with bulk methods? - for (int i = 0; i < builder.size; ++i) { - builder.buffer.put(builder.offset + i, value.buffer.get(value.offset + i)); - } + builder.buffer.put(value.buffer); return builder; }