Skip to content

Commit

Permalink
Fix wrong imports on StringUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
snicoll committed Aug 20, 2015
1 parent 11b82cc commit 6869b0d
Showing 1 changed file with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
import java.util.List;
import java.util.Map;

import org.codehaus.plexus.util.StringUtils;

/**
* A helper class generating a report from the meta-data of a particular service.
*
Expand Down Expand Up @@ -64,15 +62,15 @@ public String generate(String url) throws IOException {
private String generateHelp(String url, InitializrServiceMetadata metadata) {
String header = "Capabilities of " + url;
StringBuilder report = new StringBuilder();
report.append(StringUtils.repeat("=", header.length()) + NEW_LINE);
report.append(repeat("=", header.length()) + NEW_LINE);
report.append(header + NEW_LINE);
report.append(StringUtils.repeat("=", header.length()) + NEW_LINE);
report.append(repeat("=", header.length()) + NEW_LINE);
report.append(NEW_LINE);
reportAvailableDependencies(metadata, report);
report.append(NEW_LINE);
reportAvilableProjectTypes(metadata, report);
reportAvailableProjectTypes(metadata, report);
report.append(NEW_LINE);
z(metadata, report);
reportDefaults(report, metadata);
return report.toString();
}

Expand Down Expand Up @@ -102,7 +100,7 @@ public int compare(Dependency o1, Dependency o2) {
return dependencies;
}

private void reportAvilableProjectTypes(InitializrServiceMetadata metadata,
private void reportAvailableProjectTypes(InitializrServiceMetadata metadata,
StringBuilder report) {
report.append("Available project types:" + NEW_LINE);
report.append("------------------------" + NEW_LINE);
Expand Down Expand Up @@ -135,7 +133,7 @@ private void reportTags(StringBuilder report, ProjectType type) {
report.append("]");
}

private void z(InitializrServiceMetadata metadata, StringBuilder report) {
private void reportDefaults(StringBuilder report, InitializrServiceMetadata metadata) {
report.append("Defaults:" + NEW_LINE);
report.append("---------" + NEW_LINE);
List<String> defaultsKeys = new ArrayList<String>(metadata.getDefaults().keySet());
Expand All @@ -146,4 +144,12 @@ private void z(InitializrServiceMetadata metadata, StringBuilder report) {
}
}

private static String repeat(String s, int count) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < count; i++) {
sb.append(s);
}
return sb.toString();
}

}

0 comments on commit 6869b0d

Please sign in to comment.