Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/org/apache/maven/shared/utils/StringUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,7 @@ public static String uncapitalise(String str) {
if (length == 0) {
return "";
} else {
return new StringBuffer(length)
return new StringBuilder(length)
.append(Character.toLowerCase(str.charAt(0)))
.append(str, 1, length)
.toString();
Expand Down Expand Up @@ -1723,7 +1723,7 @@ public static String reverse(String str) {
if (str == null) {
return null;
}
return new StringBuffer(str).reverse().toString();
return new StringBuilder(str).reverse().toString();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public static void writeComment(XMLWriter writer, String comment, int indent, in
int magicNumber = indentation.length() + columnSize - "-->".length() - 1;
String[] sentences = StringUtils.split(comment, CRLF);

StringBuffer line = new StringBuffer(indentation + "<!-- ");
StringBuilder line = new StringBuilder(indentation + "<!-- ");
for (String sentence : sentences) {
String[] words = StringUtils.split(sentence, " ");
for (String word : words) {
Expand All @@ -221,7 +221,7 @@ public static void writeComment(XMLWriter writer, String comment, int indent, in
line.append("-->").append(CRLF);
writer.writeMarkup(line.toString());
}
line = new StringBuffer(indentation + "<!-- ");
line = new StringBuilder(indentation + "<!-- ");
line.append(word).append(' ');
} else {
line.append(word).append(' ');
Expand Down