He-Pin commented on code in PR #1247:
URL: https://github.com/apache/pekko/pull/1247#discussion_r1565917104
##########
actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:
##########
@@ -482,7 +482,7 @@ abstract class ByteIterator extends BufferedIterator[Byte] {
override def indexWhere(p: Byte => Boolean, from: Int = 0): Int = {
var index = 0
- while (index < from) {
+ while (index < from && hasNext) {
Review Comment:
the changes in byte Iterator is not needed.
IN Netty, these method is named as firstIndexOf and lastIndexOf, that's an
option too.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]