1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 00:59:39 +02: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:
Florian Schmaus 2015-07-21 08:19:15 +02:00
parent 19ebcb814b
commit e0e4fd9b12
46 changed files with 159 additions and 142 deletions

View file

@ -154,7 +154,7 @@ public class XmppHostnameVerifier implements HostnameVerifier {
StringBuilder sb = new StringBuilder("No subject alternative DNS name matching "
+ name + " found. Tried: ");
for (String nonMatchingDnsAltname : nonMatchingDnsAltnames) {
sb.append(nonMatchingDnsAltname).append(",");
sb.append(nonMatchingDnsAltname).append(',');
}
throw new CertificateException(sb.toString());
}
@ -279,7 +279,7 @@ public class XmppHostnameVerifier implements HostnameVerifier {
StringBuilder sb = new StringBuilder("No subject alternative names matching IP address "
+ expectedIP + " found. Tried: ");
for (String s : nonMatchingIpAltnames) {
sb.append(s).append(",");
sb.append(s).append(',');
}
throw new CertificateException(sb.toString());
}