Skip to content

Commit

Permalink
review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
niloc132 committed Aug 30, 2022
1 parent f6caf2c commit 12007b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public void write(int i) throws IOException {

@Override
public void write(@NotNull byte[] b) throws IOException {
// noinspection PrimitiveArrayArgumentToVarargsMethod
rawIoBaseSupplier.get().callMethod("write", new String(b));
}

Expand Down
6 changes: 5 additions & 1 deletion py/server/deephaven_internal/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ class TeeStream(io.TextIOBase):

@classmethod
def split(cls, py_stream, java_stream):
if hasattr(py_stream, "encoding"):
encoding = py_stream.encoding
else:
encoding = 'UTF-8'
return TeeStream(
orig_stream=py_stream,
should_write_to_orig_stream=True,
write_func=lambda t: java_stream.write(bytes(t, py_stream.encoding)),
write_func=lambda t: java_stream.write(bytes(t, encoding)),
flush_func=lambda: java_stream.flush(),
close_func=lambda: java_stream.close()
)
Expand Down

0 comments on commit 12007b3

Please sign in to comment.