You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "pjfanning (via GitHub)" <gi...@apache.org> on 2023/08/06 08:54:40 UTC

[GitHub] [incubator-pekko] pjfanning commented on a diff in pull request #363: =str Skip parsing when buffer size is 0.

pjfanning commented on code in PR #363:
URL: https://github.com/apache/incubator-pekko/pull/363#discussion_r1285179109


##########
stream/src/main/scala/org/apache/pekko/stream/impl/JsonObjectParser.scala:
##########
@@ -115,7 +115,9 @@ import pekko.util.ByteString
   private def seekObject(): Boolean = {
     completedObject = false
     val bufSize = buffer.length
-
+    if (bufSize == 0) {

Review Comment:
   I don't like 'return' statements. Can't you just do this ?
   
   ```
   if (bufSize > 0) {
     // add everything from the rest if the function here
   }
   ```



-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org