mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 17:19:39 +02:00
Smack 4.1.4
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJV9nAlXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxMzU3QjAxODY1QjI1MDNDMTg0NTNEMjA4 Q0FDMkE5Njc4NTQ4RTM1AAoJEIysKpZ4VI41sFEIAJlfRspk6S5ymNc4w7u/FT1w MpHT/cxqIQIBU9J5dYqeW6Y8O6VuUeknCmZBEv7dIVHroTmvfosMauAyRZJXWeeL FQQTBqDJszYdM88x/d5X6d25lCEBdQkdDh2a5s9AIy9RH0iXE74AypuikbroK+VC zI3wRPUFq7WnARtmiP2NalSgSNv5ToeicBO+JSniQ+O52ZAlP2FSDfi4uzPPigdP Ip/V3eF4Bp0YZimcxAnWdnMU+ciVLClRYKgD3+qTEoic7dx3dzeTyrk1NoLRgQl9 mfcNXBgUScHZAoSIkR0QiUx9ktPCJ950qa+XtW3B8NtDOZkXegUL/a8ukQAuz+k= =qMsC -----END PGP SIGNATURE----- Merge tag '4.1.4' Smack 4.1.4
This commit is contained in:
commit
04a0004035
10 changed files with 96 additions and 12 deletions
|
@ -459,7 +459,7 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
|||
if (!config.allowNullOrEmptyUsername) {
|
||||
StringUtils.requireNotNullOrEmpty(username, "Username must not be null or empty");
|
||||
}
|
||||
throwNotConnectedExceptionIfAppropriate();
|
||||
throwNotConnectedExceptionIfAppropriate("Did you call connect() before login()?");
|
||||
throwAlreadyLoggedInExceptionIfAppropriate();
|
||||
usedUsername = username != null ? username.toString() : null;
|
||||
usedPassword = password;
|
||||
|
@ -604,8 +604,12 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
|||
}
|
||||
|
||||
protected void throwNotConnectedExceptionIfAppropriate() throws NotConnectedException {
|
||||
throwNotConnectedExceptionIfAppropriate(null);
|
||||
}
|
||||
|
||||
protected void throwNotConnectedExceptionIfAppropriate(String optionalHint) throws NotConnectedException {
|
||||
if (!isConnected()) {
|
||||
throw new NotConnectedException();
|
||||
throw new NotConnectedException(optionalHint);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -164,7 +164,12 @@ public class SmackException extends Exception {
|
|||
private static final long serialVersionUID = 9197980400776001173L;
|
||||
|
||||
public NotConnectedException() {
|
||||
super("Client is not, or no longer, connected");
|
||||
this(null);
|
||||
}
|
||||
|
||||
public NotConnectedException(String optionalHint) {
|
||||
super("Client is not, or no longer, connected."
|
||||
+ (optionalHint != null ? ' ' + optionalHint : ""));
|
||||
}
|
||||
|
||||
public NotConnectedException(XMPPConnection connection, String details) {
|
||||
|
|
|
@ -297,7 +297,8 @@ public class PacketParserUtils {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the textual content of an element as String.
|
||||
* Returns the textual content of an element as String. After this method returns the parser
|
||||
* position will be END_TAG, following the established pull parser calling convention.
|
||||
* <p>
|
||||
* The parser must be positioned on a START_TAG of an element which MUST NOT contain Mixed
|
||||
* Content (as defined in XML 3.2.2), or else an XmlPullParserException will be thrown.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue