aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/entities
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/eu/siacs/conversations/entities')
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Account.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Account.java b/src/main/java/eu/siacs/conversations/entities/Account.java
index ee4cce80..e367b41a 100644
--- a/src/main/java/eu/siacs/conversations/entities/Account.java
+++ b/src/main/java/eu/siacs/conversations/entities/Account.java
@@ -88,10 +88,7 @@ public class Account extends AbstractEntity {
this.uuid = uuid;
this.jid = jid;
if (jid.getResourcepart().isEmpty()) {
- try {
- this.setResource("mobile");
- } catch (final InvalidJidException ignored) {
- }
+ this.setResource("mobile");
}
this.password = password;
this.options = options;
@@ -164,9 +161,12 @@ public class Account extends AbstractEntity {
return getXmppConnection() != null && getStatus() > STATUS_NO_INTERNET && (getXmppConnection().getAttempt() >= 2);
}
- public void setResource(final String resource) throws InvalidJidException {
- jid = Jid.fromParts(jid.getLocalpart(), jid.getDomainpart(), resource);
- }
+ public void setResource(final String resource){
+ try {
+ jid = Jid.fromParts(jid.getLocalpart(), jid.getDomainpart(), resource);
+ } catch (final InvalidJidException ignored) {
+ }
+ }
public String getResource() {
return jid.getResourcepart();