From 9117b6bc0e37e1f17765495bee0a1ec8ae2ec51f Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Fri, 4 Mar 2016 17:56:02 +0100 Subject: [PATCH] Coverity 72994 --- .../frontend/webdav/mount/command/CommandResult.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main/frontend-webdav/src/main/java/org/cryptomator/frontend/webdav/mount/command/CommandResult.java b/main/frontend-webdav/src/main/java/org/cryptomator/frontend/webdav/mount/command/CommandResult.java index a020f830e..b2fe5b7dc 100644 --- a/main/frontend-webdav/src/main/java/org/cryptomator/frontend/webdav/mount/command/CommandResult.java +++ b/main/frontend-webdav/src/main/java/org/cryptomator/frontend/webdav/mount/command/CommandResult.java @@ -30,6 +30,7 @@ public final class CommandResult { /** * Constructs a CommandResult from a terminated process and closes all its streams. + * * @param process An already finished process. */ CommandResult(Process process) { @@ -52,7 +53,7 @@ public final class CommandResult { logDebugInfo(); } } - + /** * @return Data written to STDOUT */ @@ -94,10 +95,10 @@ public final class CommandResult { assertNoException(); int exitValue = getExitValue(); if (exitValue != 0) { - throw new CommandFailedException(format("Command execution failed. Exit code: %d\n" + "# Output:\n" + "%s\n" + "# Error:\n" + "%s", exitValue, stdout, stderr)); + throw new CommandFailedException(format("Command execution failed. Exit code: %d %n# Output:%n%s %n# Error: %n%s", exitValue, stdout, stderr)); } } - + private void assertNoException() throws CommandFailedException { if (exception != null) { throw exception;