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
|
|
@ -155,27 +155,27 @@ public class AMPExtension implements ExtensionElement {
|
|||
@Override
|
||||
public String toXML() {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
buf.append("<").append(getElementName()).append(" xmlns=\"").append(getNamespace()).append("\"");
|
||||
buf.append('<').append(getElementName()).append(" xmlns=\"").append(getNamespace()).append('"');
|
||||
if (status != null) {
|
||||
buf.append(" status=\"").append(status.toString()).append("\"");
|
||||
buf.append(" status=\"").append(status.toString()).append('"');
|
||||
}
|
||||
if (to != null) {
|
||||
buf.append(" to=\"").append(to).append("\"");
|
||||
buf.append(" to=\"").append(to).append('"');
|
||||
}
|
||||
if (from != null) {
|
||||
buf.append(" from=\"").append(from).append("\"");
|
||||
buf.append(" from=\"").append(from).append('"');
|
||||
}
|
||||
if (perHop) {
|
||||
buf.append(" per-hop=\"true\"");
|
||||
}
|
||||
buf.append(">");
|
||||
buf.append('>');
|
||||
|
||||
// Loop through all the rules and append them to the string buffer
|
||||
for (Rule rule : getRules()) {
|
||||
buf.append(rule.toXML());
|
||||
}
|
||||
|
||||
buf.append("</").append(getElementName()).append(">");
|
||||
buf.append("</").append(getElementName()).append('>');
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue