diff --git a/actor/src/main/scala-2.12/org/apache/pekko/util/ByteIterator.scala b/actor/src/main/scala-2.12/org/apache/pekko/util/ByteIterator.scala index 244acd76bd..c46ba2f54a 100644 --- a/actor/src/main/scala-2.12/org/apache/pekko/util/ByteIterator.scala +++ b/actor/src/main/scala-2.12/org/apache/pekko/util/ByteIterator.scala @@ -208,7 +208,7 @@ object ByteIterator { @inline private def current: ByteArrayIterator = iterators.head @inline private def dropCurrent(): Unit = { iterators = iterators.tail } - @inline def clear(): Unit = { iterators = MultiByteArrayIterator.empty.iterators } + @inline final def clear(): Unit = { iterators = MultiByteArrayIterator.empty.iterators } @inline final def hasNext: Boolean = current.hasNext diff --git a/actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala b/actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala index fa5b9d0849..4b650c1ec5 100644 --- a/actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala +++ b/actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala @@ -220,7 +220,7 @@ object ByteIterator { @inline private def current: ByteArrayIterator = iterators.head @inline private def dropCurrent(): Unit = { iterators = iterators.tail } - @inline def clear(): Unit = { iterators = MultiByteArrayIterator.empty.iterators } + @inline final def clear(): Unit = { iterators = MultiByteArrayIterator.empty.iterators } @inline final def hasNext: Boolean = current.hasNext