Skip to content

Commit

Permalink
Iterate directly over String.split() result
Browse files Browse the repository at this point in the history
Use syntactic sugar to make it clear that we are processing
all entries and do not care about the actual array.

Signed-off-by: Robert Varga <nite@hq.sk>
  • Loading branch information
rovarga committed Sep 2, 2017
1 parent 735b628 commit bf01d7d
Showing 1 changed file with 4 additions and 5 deletions.
Expand Up @@ -135,11 +135,10 @@ public static void configure(LoggingConfigurationType config, String version, Op
if (!StringUtils.isEmpty(internalLog)) {
//Parse internal log
res.recordSuccess();
String internalLogLines[] = internalLog.split("\n");
for (int i = 0; i < internalLogLines.length; i++) {
if (internalLogLines[i].contains("|-ERROR"))
res.recordPartialError(internalLogLines[i]);
res.appendDetail(internalLogLines[i]);
for (String internalLogLine : internalLog.split("\n")) {
if (internalLogLine.contains("|-ERROR"))
res.recordPartialError(internalLogLine);
res.appendDetail(internalLogLine);
}
LOGGER.trace("LogBack internal log:\n{}",internalLog);
} else {
Expand Down

0 comments on commit bf01d7d

Please sign in to comment.