Skip to content

Commit 352558e

Browse files
committed
Update ByteBufferBackedInputStream.scala
1 parent 48815e4 commit 352558e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

actor/src/main/scala/org/apache/pekko/util/ByteBufferBackedInputStream.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,14 @@ import java.nio.ByteBuffer
2727
* Derived from https://github.com/FasterXML/jackson-databind/blob/1e73db1fabd181937c68b49ffc502fb7f614d0c2/src/main/java/com/fasterxml/jackson/databind/util/ByteBufferBackedInputStream.java
2828
*/
2929
private[util] class ByteBufferBackedInputStream(bb: ByteBuffer) extends InputStream {
30+
3031
override def available: Int = bb.remaining
3132

3233
@throws[IOException]
33-
override def read: Int = if (bb.hasRemaining) bb.get & 0xFF
34-
else -1
34+
override def read: Int = {
35+
if (bb.hasRemaining) bb.get & 0xFF
36+
else -1
37+
}
3538

3639
@throws[IOException]
3740
override def read(bytes: Array[Byte], off: Int, len: Int): Int = {

0 commit comments

Comments
 (0)