mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-11-08 19:46:10 +01:00
Fix potential null exceptions
This commit is contained in:
parent
324a69f7fa
commit
dbf84773d4
2 changed files with 20 additions and 8 deletions
|
|
@ -7,6 +7,7 @@ public abstract class TerminalOutput {
|
|||
|
||||
/** Write a string using the UTF-8 encoding to the terminal client. */
|
||||
public final void write(String data) {
|
||||
if (data == null) return;
|
||||
byte[] bytes = data.getBytes(StandardCharsets.UTF_8);
|
||||
write(bytes, 0, bytes.length);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue