Passing a char to StringBuilder's constructor is interpreted as
setting the initial capacity, not providing the initial content. This
was already accounted for; so this patch removes the char arguments
since they only end up being confusing.
Change-Id: Ic7b1281174e0faec891cb96dd89e0d4aa4ced670
Signed-off-by: Stephen Kitt <skitt@redhat.com>
if (splittedByNewLine[cur].contains(JDOC_START)) {
fixedLines.add(new StringBuilder(splittedByNewLine[cur]).append(NEW_LINE).toString());
for (int next = cur + 1; next < splittedByNewLine.length - 1; next++) {
+ fixedLines.add(
+ new StringBuilder().append(SPACE).append(splittedByNewLine[next]).append(NEW_LINE).toString());
if (splittedByNewLine[next].contains(JDOC_END)) {
- fixedLines.add(new StringBuilder(SPACE)
- .append(SPACE).append(splittedByNewLine[next]).append(NEW_LINE).toString());
cur = next + 1;
break;
- } else {
- fixedLines.add(new StringBuilder(SPACE)
- .append(SPACE).append(splittedByNewLine[next]).append(NEW_LINE).toString());
}
}
}
if (text.isEmpty()) {
return "";
}
- final StringBuilder sb = new StringBuilder(NEW_LINE);
+ final StringBuilder sb = new StringBuilder();
sb.append("/**");
sb.append(NEW_LINE);
for (final String t : NL_SPLITTER.split(text)) {