From cf6076ce43ff1605bcf1fc5bdcc5c08005e80632 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Wed, 23 Apr 2014 09:31:52 +0200 Subject: [PATCH] Remove unnecessary try/catch blocks in DirectoryRosterStore --- .../smack/DirectoryRosterStore.java | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/core/src/main/java/org/jivesoftware/smack/DirectoryRosterStore.java b/core/src/main/java/org/jivesoftware/smack/DirectoryRosterStore.java index 4d65e787f..faaf1d57c 100644 --- a/core/src/main/java/org/jivesoftware/smack/DirectoryRosterStore.java +++ b/core/src/main/java/org/jivesoftware/smack/DirectoryRosterStore.java @@ -156,24 +156,13 @@ public class DirectoryRosterStore implements RosterStore { @Override public boolean removeEntry(String bareJid, String version) { - try { - return getBareJidFile(bareJid).delete() && setRosterVersion(version); - } - catch (SecurityException e) { - e.printStackTrace(); - return false; - } + return getBareJidFile(bareJid).delete() && setRosterVersion(version); } @Override public boolean resetEntries(Collection items, String version) { - try { - for (File file : fileDir.listFiles(rosterDirFilter)) { - file.delete(); - } - } catch (SecurityException e) { - e.printStackTrace(); - return false; + for (File file : fileDir.listFiles(rosterDirFilter)) { + file.delete(); } for (Item item : items) { if (!addEntryRaw(item)) {