You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by jr...@apache.org on 2023/02/23 09:53:50 UTC

[incubator-pekko-http] branch main updated: fix some warnings (#82)

This is an automated email from the ASF dual-hosted git repository.

jrudolph pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko-http.git


The following commit(s) were added to refs/heads/main by this push:
     new 820c6f9c4 fix some warnings (#82)
820c6f9c4 is described below

commit 820c6f9c4f0a326f9ccd656816df7570c6527745
Author: Johannes Rudolph <jo...@gmail.com>
AuthorDate: Thu Feb 23 10:53:45 2023 +0100

    fix some warnings (#82)
---
 .../apache/pekko/http/impl/engine/parsing/HttpMessageParser.scala   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/http-core/src/main/scala/org/apache/pekko/http/impl/engine/parsing/HttpMessageParser.scala b/http-core/src/main/scala/org/apache/pekko/http/impl/engine/parsing/HttpMessageParser.scala
index 1b331c404..84f497622 100644
--- a/http-core/src/main/scala/org/apache/pekko/http/impl/engine/parsing/HttpMessageParser.scala
+++ b/http-core/src/main/scala/org/apache/pekko/http/impl/engine/parsing/HttpMessageParser.scala
@@ -100,7 +100,7 @@ private[http] trait HttpMessageParser[Output >: MessageOutput <: ParserOutput] {
   protected final def doPull(): Output =
     result match {
       case null => if (terminated) StreamEnd else NeedMoreData
-      case buffer: ListBuffer[Output] =>
+      case buffer: ListBuffer[Output] @unchecked =>
         val head = buffer.head
         buffer.remove(0) // faster than `ListBuffer::drop`
         if (buffer.isEmpty) result = null
@@ -326,8 +326,8 @@ private[http] trait HttpMessageParser[Output >: MessageOutput <: ParserOutput] {
   }
 
   protected def emit(output: Output): Unit = result match {
-    case null                       => result = output
-    case buffer: ListBuffer[Output] => buffer += output
+    case null                                  => result = output
+    case buffer: ListBuffer[Output] @unchecked => buffer += output
     case old: Output @unchecked =>
       val buffer = new ListBuffer[Output]
       buffer += old


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