From d17e1ef87545c50f2107fde944622e20d916fa75 Mon Sep 17 00:00:00 2001 From: Thomas Leplus Date: Mon, 29 Nov 2021 22:16:25 -0800 Subject: [PATCH] Fix trimming: trim() return value should be used. --- arduino-core/src/processing/app/BaseNoGui.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arduino-core/src/processing/app/BaseNoGui.java b/arduino-core/src/processing/app/BaseNoGui.java index f648d87da..cf0b7f1ea 100644 --- a/arduino-core/src/processing/app/BaseNoGui.java +++ b/arduino-core/src/processing/app/BaseNoGui.java @@ -888,9 +888,7 @@ public class BaseNoGui { // then trim any other character (\r) so saveStrings can print it in the correct // format for every OS String strArray[] = str.split("\n"); - for (String item : strArray) { - item.trim(); - } + Arrays.parallelSetAll(strArray, i -> strArray[i].trim()); PApplet.saveStrings(temp, strArray); try {