Skip to content

Commit

Permalink
fix(cli): Print aggregated output just once
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmiray committed Feb 22, 2023
1 parent 1740a6e commit 7eb6a06
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,9 @@ private void output(Set<JarProcessor.JarFileResult<BytecodeVersions>> results) {
output(result);
} else {
buildReport(outputFormat, root, result);
writeOutput(resolveFormatter(outputFormat).write(root));
}
if (results.size() > 1) parent().getOut().println("");
}
writeOutput(resolveFormatter(outputFormat).write(root));
}

private void output(JarProcessor.JarFileResult<BytecodeVersions> result) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,9 @@ private void output(Set<JarProcessor.JarFileResult<Optional<String>>> results) {
output(result);
} else {
buildReport(root, result);
writeOutput(resolveFormatter(outputFormat).write(root));
}
if (results.size() > 1) parent().getOut().println("");
}
writeOutput(resolveFormatter(outputFormat).write(root));
}

private void output(JarProcessor.JarFileResult<Optional<String>> result) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,9 @@ private void output(Set<JarProcessor.JarFileResult<Optional<java.util.jar.Manife
output(result);
} else {
buildReport(root, result);
writeOutput(resolveFormatter(outputFormat).write(root));
}
if (results.size() > 1) parent().getOut().println("");
}
writeOutput(resolveFormatter(outputFormat).write(root));
}

private void output(JarProcessor.JarFileResult<Optional<java.util.jar.Manifest>> result) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,9 @@ private void output(Set<JarProcessor.JarFileResult<java.lang.module.ModuleDescri
output(result);
} else {
buildReport(outputFormat, root, result);
writeOutput(resolveFormatter(outputFormat).write(root));
}
if (results.size() > 1) parent().getOut().println("");
}
writeOutput(resolveFormatter(outputFormat).write(root));
}

private void output(JarProcessor.JarFileResult<java.lang.module.ModuleDescriptor> result) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ private void output(Set<JarProcessor.JarFileResult<org.kordamp.jarviz.core.model
output(result);
} else {
buildReport(root, result);
writeOutput(resolveFormatter(outputFormat).write(root));
}
if (results.size() > 1) parent().getOut().println("");
}
writeOutput(resolveFormatter(outputFormat).write(root));
}

private void output(JarProcessor.JarFileResult<org.kordamp.jarviz.core.model.ModuleName> result) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,9 @@ private void output(Set<JarProcessor.JarFileResult<Set<String>>> results) {
output(result);
} else {
buildReport(outputFormat, root, result);
writeOutput(resolveFormatter(outputFormat).write(root));
}
if (results.size() > 1) parent().getOut().println("");
}
writeOutput(resolveFormatter(outputFormat).write(root));
}

private void output(JarProcessor.JarFileResult<Set<String>> result) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ private void output(Set<JarProcessor.JarFileResult<Optional<Set<String>>>> resul
output(result);
} else {
buildReport(outputFormat, root, result);
writeOutput(resolveFormatter(outputFormat).write(root));
}
if (results.size() > 1) parent().getOut().println("");
}
writeOutput(resolveFormatter(outputFormat).write(root));
}

private void output(JarProcessor.JarFileResult<Optional<Set<String>>> result) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@ private void output(Set<JarProcessor.JarFileResult<Optional<Set<String>>>> resul
output(result);
} else {
buildReport(outputFormat, root, result);
writeOutput(resolveFormatter(outputFormat).write(root));
}
if (results.size() > 1) parent().getOut().println("");
}
writeOutput(resolveFormatter(outputFormat).write(root));
}

private void output(JarProcessor.JarFileResult<Optional<Set<String>>> result) {
Expand Down

0 comments on commit 7eb6a06

Please sign in to comment.