Add ByteString.emptyByteString to Java API (#26931)

* Add ByteString.emptyByteString to Java API

To work around https://github.com/scala/bug/issues/11509

* Add note to 2.6 migration document
This commit is contained in:
Arnout Engelen 2019-05-16 14:02:49 +02:00 committed by GitHub
parent b399e728a2
commit 7b20b89ce0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 24 additions and 9 deletions

View file

@ -25,6 +25,7 @@ import akka.stream.javadsl.*;
import akka.stream.stage.*;
import akka.util.ByteIterator;
import akka.util.ByteString;
import static akka.util.ByteString.emptyByteString;
import akka.util.ByteStringBuilder;
import static org.junit.Assert.assertArrayEquals;
@ -156,7 +157,7 @@ public class BidiFlowDocTest extends AbstractJavaTest {
return new GraphStageLogic(shape) {
// this holds the received but not yet parsed bytes
private ByteString stash = ByteString.empty();
private ByteString stash = emptyByteString();
// this holds the current message length or -1 if at a boundary
private int needed = -1;