Skip to content

Commit 311be61

Browse files
committed
Sync with QPid
1 parent 99b0d51 commit 311be61

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/qpid/org/apache/qpid/protonj2/buffer/netty/ProtonBufferToNetty5Adapter.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -968,12 +968,12 @@ public T first() {
968968

969969
@SuppressWarnings("unchecked")
970970
@Override
971-
public T next() {
971+
public <N extends Next & BufferComponent> N next() {
972972
if (current != null) {
973973
current = accessor.next();
974974
}
975975

976-
return current != null ? (T) this : null;
976+
return current != null ? (N) this : null;
977977
}
978978

979979
@Override
@@ -1067,6 +1067,8 @@ public BufferComponent skipWritableBytes(int byteCount) {
10671067
current.advanceWriteOffset(byteCount);
10681068
return this;
10691069
}
1070+
1071+
10701072
}
10711073

10721074
private final static class ProtonByteCursorAdapter implements ByteCursor {

0 commit comments

Comments
 (0)