Fix ambiguous reference to position in ByteBuffer/Buffer (#28709)
This commit is contained in:
parent
d8aed9e9d3
commit
d392e6a7f1
1 changed files with 2 additions and 2 deletions
|
|
@ -383,7 +383,7 @@ object ByteString {
|
|||
val dst = Base64.getDecoder.decode(ByteBuffer.wrap(bytes, startIndex, length))
|
||||
if (dst.hasArray) {
|
||||
if (dst.array.length == dst.remaining) ByteString1C(dst.array)
|
||||
else ByteString1(dst.array, dst.arrayOffset + dst.position, dst.remaining)
|
||||
else ByteString1(dst.array, dst.arrayOffset + dst.position(), dst.remaining)
|
||||
} else CompactByteString(dst)
|
||||
}
|
||||
|
||||
|
|
@ -394,7 +394,7 @@ object ByteString {
|
|||
val dst = Base64.getEncoder.encode(ByteBuffer.wrap(bytes, startIndex, length))
|
||||
if (dst.hasArray) {
|
||||
if (dst.array.length == dst.remaining) ByteString1C(dst.array)
|
||||
else ByteString1(dst.array, dst.arrayOffset + dst.position, dst.remaining)
|
||||
else ByteString1(dst.array, dst.arrayOffset + dst.position(), dst.remaining)
|
||||
} else CompactByteString(dst)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue