You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/01 15:38:41 UTC

[GitHub] [beam] lukecwik commented on a diff in pull request #17787: [BEAM-14539] Ensure that the print stream can handle larger byte arrays being written and also allow for a growable amount of carry over.

lukecwik commented on code in PR #17787:
URL: https://github.com/apache/beam/pull/17787#discussion_r886955553


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/logging/JulHandlerPrintStreamAdapterFactory.java:
##########
@@ -130,46 +128,50 @@ public synchronized void write(int i) {
     @Override
     public void write(byte[] a, int offset, int length) {
       ByteBuffer incoming = ByteBuffer.wrap(a, offset, length);
+      assert incoming.hasArray();

Review Comment:
   it still does hold, added code to return early for length == 0



##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/logging/JulHandlerPrintStreamAdapterFactory.java:
##########
@@ -65,8 +65,7 @@ private static class JulHandlerPrintStream extends PrintStream {
     private final Level messageLevel;
     private final CharsetDecoder decoder;

Review Comment:
   done



-- 
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: github-unsubscribe@beam.apache.org

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