Skip to content

Commit c802de4

Browse files
committed
change to the java8 compliant method
1 parent 76aedb4 commit c802de4

File tree

1 file changed

+2
-1
lines changed
  • src/main/java/com/neuronrobotics/sdk/common

1 file changed

+2
-1
lines changed

src/main/java/com/neuronrobotics/sdk/common/Log.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,8 @@ public void write(int b) throws IOException {
471471
String text = instance.incoming.asString();
472472
instance.incoming.clear();
473473
if (text != null && text.length() > 0){
474-
Files.writeString(logfile.toPath(), text, StandardCharsets.UTF_8, StandardOpenOption.APPEND);
474+
//Files.writeString(logfile.toPath(), text, StandardCharsets.UTF_8, StandardOpenOption.APPEND); // java 11+
475+
Files.write(logfile.toPath(), text.getBytes(StandardCharsets.UTF_8), StandardOpenOption.APPEND);
475476
}
476477
text = null;
477478
} catch (Exception e) {

0 commit comments

Comments
 (0)