-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InputStream from StreamConverters.asInputStream respects read() contract #21954
Conversation
Can one of the repo owners verify this patch? |
OK TO TEST |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Test PASSed. |
@@ -117,7 +117,7 @@ private[akka] class InputStreamAdapter( | |||
@scala.throws(classOf[IOException]) | |||
override def read(): Int = { | |||
val a = Array[Byte](1) | |||
if (read(a, 0, 1) != -1) a(0) | |||
if (read(a, 0, 1) != -1) a(0) & 0xff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eh, sign extension. The wonders of not having unsigned types. Great catch btw.
Backporting |
Refs #21943