He-Pin commented on code in PR #2847:
URL: https://github.com/apache/pekko/pull/2847#discussion_r3041141119
##########
actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:
##########
@@ -141,6 +141,45 @@ object ByteIterator {
} else throw new NoSuchElementException("next on empty iterator")
}
+ override def getShort(implicit byteOrder: ByteOrder): Short = {
+ if (len < 2) throw new NoSuchElementException("next on empty iterator")
+ if (byteOrder == ByteOrder.BIG_ENDIAN) {
+ val result = SWARUtil.getShort(array, from)
+ from += 2
+ result
+ } else if (byteOrder == ByteOrder.LITTLE_ENDIAN) {
Review Comment:
this test is not needed,
--
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]