diff --git a/smack-core/src/main/java/org/jivesoftware/smack/SmackException.java b/smack-core/src/main/java/org/jivesoftware/smack/SmackException.java index 38263ad44..af2dfa8ce 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/SmackException.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/SmackException.java @@ -181,7 +181,7 @@ public class SmackException extends Exception { sb.append(", "); } // Remove the last whitespace - sb.deleteCharAt(sb.length()); + sb.deleteCharAt(sb.length() - 1); return new ConnectionException(sb.toString(), failedAddresses); }