mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-12-12 22:11:07 +01:00
Add checkstyle rule for StringBuilder.append(char)
And replace all instances where String.Builder.append() is called with a String of length one with append(char). Also adds StringUtils.toStringBuilder(Collection, String).
This commit is contained in:
parent
19ebcb814b
commit
e0e4fd9b12
46 changed files with 159 additions and 142 deletions
|
|
@ -328,7 +328,7 @@ public class StreamInitiation extends IQ {
|
|||
public String toXML() {
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
|
||||
buffer.append("<").append(getElementName()).append(" xmlns=\"")
|
||||
buffer.append('<').append(getElementName()).append(" xmlns=\"")
|
||||
.append(getNamespace()).append("\" ");
|
||||
|
||||
if (getName() != null) {
|
||||
|
|
@ -348,14 +348,14 @@ public class StreamInitiation extends IQ {
|
|||
}
|
||||
|
||||
if ((desc != null && desc.length() > 0) || isRanged) {
|
||||
buffer.append(">");
|
||||
buffer.append('>');
|
||||
if (getDesc() != null && desc.length() > 0) {
|
||||
buffer.append("<desc>").append(StringUtils.escapeForXML(getDesc())).append("</desc>");
|
||||
}
|
||||
if (isRanged()) {
|
||||
buffer.append("<range/>");
|
||||
}
|
||||
buffer.append("</").append(getElementName()).append(">");
|
||||
buffer.append("</").append(getElementName()).append('>');
|
||||
}
|
||||
else {
|
||||
buffer.append("/>");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue