aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/entities
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-05-14 14:42:21 +0200
committerDaniel Gultsch <daniel@gultsch.de>2015-05-20 03:48:14 +0200
commite32f380dae4913d8152fc92b76193de241089cf8 (patch)
tree788ee2f2a2c5f3eeff479d66b817f2ab059ca629 /src/main/java/eu/siacs/conversations/entities
parent7824c01748a89688c5f76307cc1f4221a9e2ffb5 (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.java14
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) {