Skip to content

Commit

Permalink
code smells convert \n to %n in string.format
Browse files Browse the repository at this point in the history
Signed-off-by: Jeromy Cannon <[email protected]>
  • Loading branch information
jeromy-cannon committed Sep 21, 2023
1 parent 9f804ae commit c05ba79
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public <T> T responseAs(final Class<T> responseClass, final Duration timeout) {
final String standardError = StreamUtils.streamToString(suppressExceptions(this::standardError));

LOGGER.debug(
"ResponseAs exiting with exitCode: {}\n\tResponseClass: {}\n\tstandardOutput: {}\n\tstandardError: {}",
"ResponseAs exiting with exitCode: {}%n\tResponseClass: {}%n\tstandardOutput: {}%n\tstandardError: {}",
exitCode(),
responseClass.getName(),
standardOutput,
Expand All @@ -239,7 +239,7 @@ public <T> T responseAs(final Class<T> responseClass, final Duration timeout) {
} catch (final Exception e) {
LOGGER.warn(
String.format(
"ResponseAs failed to deserialize response into class: %s\n\tresponse: %s",
"ResponseAs failed to deserialize response into class: %s%n\tresponse: %s",
responseClass.getName(), standardOutput),
e);

Expand Down Expand Up @@ -292,7 +292,7 @@ public <T> List<T> responseAsList(final Class<T> responseClass, final Duration t
final String standardError = StreamUtils.streamToString(suppressExceptions(this::standardError));

LOGGER.debug(
"ResponseAsList exiting with exitCode: {}\n\tResponseClass: {}\n\tstandardOutput: {}\n\tstandardError: {}",
"ResponseAsList exiting with exitCode: {}%n\tResponseClass: {}%n\tstandardOutput: {}%n\tstandardError: {}",
exitCode(),
responseClass.getName(),
standardOutput,
Expand All @@ -306,7 +306,7 @@ public <T> List<T> responseAsList(final Class<T> responseClass, final Duration t
} catch (final Exception e) {
LOGGER.warn(
String.format(
"ResponseAsList failed to deserialize the output into a list of the specified class: %s\n\tresponse: %s",
"ResponseAsList failed to deserialize the output into a list of the specified class: %s%n\tresponse: %s",
responseClass.getName(), standardOutput),
e);

Expand Down Expand Up @@ -346,14 +346,14 @@ public void call(final Duration timeout) {
final String standardError = StreamUtils.streamToString(suppressExceptions(this::standardError));

LOGGER.debug(
"Call exiting with exitCode: {}\n\tstandardOutput: {}\n\tstandardError: {}",
"Call exiting with exitCode: {}%n\tstandardOutput: {}%n\tstandardError: {}",
exitCode(),
standardOutput,
standardError);

if (exitCode() != 0) {
LOGGER.warn(
"Call failed with exitCode: {}\n\tstandardOutput: {}\n\tstandardError: {}",
"Call failed with exitCode: {}%n\tstandardOutput: {}%n\tstandardError: {}",
exitCode(),
standardOutput,
standardError);
Expand Down

0 comments on commit c05ba79

Please sign in to comment.