Fully replace .trim() with .strip() [stage]

This commit is contained in:
crschnick
2025-05-21 06:13:36 +00:00
parent 984dda0287
commit f41784f61c
25 changed files with 38 additions and 38 deletions

View File

@@ -135,7 +135,7 @@ public class IncusCommandView extends CommandViewBase {
var output = c.readStdoutOrThrow();
return output.lines()
.collect(Collectors.toMap(
s -> s.trim().split(",")[0], s -> s.trim().split(",")[1], (x, y) -> y, LinkedHashMap::new));
s -> s.strip().split(",")[0], s -> s.strip().split(",")[1], (x, y) -> y, LinkedHashMap::new));
}
}

View File

@@ -141,7 +141,7 @@ public class LxdCommandView extends CommandViewBase {
var output = c.readStdoutOrThrow();
return output.lines()
.collect(Collectors.toMap(
s -> s.trim().split(",")[0], s -> s.trim().split(",")[1], (x, y) -> y, LinkedHashMap::new));
s -> s.strip().split(",")[0], s -> s.strip().split(",")[1], (x, y) -> y, LinkedHashMap::new));
} catch (ProcessOutputException ex) {
if (ex.getOutput().contains("Error: unknown shorthand flag: 'f' in -f")) {
throw ErrorEvent.expected(ProcessOutputException.withParagraph("Unsupported legacy LXD version", ex));