diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-05-14 14:42:21 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-05-20 03:48:14 +0200 |
commit | e32f380dae4913d8152fc92b76193de241089cf8 (patch) | |
tree | 788ee2f2a2c5f3eeff479d66b817f2ab059ca629 /src/main/java/eu/siacs/conversations/entities | |
parent | 7824c01748a89688c5f76307cc1f4221a9e2ffb5 (diff) |
provide helper function for getting the content of a child directly
Diffstat (limited to 'src/main/java/eu/siacs/conversations/entities')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Bookmark.java | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Bookmark.java b/src/main/java/eu/siacs/conversations/entities/Bookmark.java index f81f1a87..cc6f146b 100644 --- a/src/main/java/eu/siacs/conversations/entities/Bookmark.java +++ b/src/main/java/eu/siacs/conversations/entities/Bookmark.java @@ -75,12 +75,7 @@ public class Bookmark extends Element implements ListItem { } public String getNick() { - Element nick = this.findChild("nick"); - if (nick != null) { - return nick.getContent(); - } else { - return null; - } + return this.findChildContent("nick"); } public void setNick(String nick) { @@ -96,12 +91,7 @@ public class Bookmark extends Element implements ListItem { } public String getPassword() { - Element password = this.findChild("password"); - if (password != null) { - return password.getContent(); - } else { - return null; - } + return this.findChildContent("password"); } public void setPassword(String password) { |