mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-26 05:52:06 +01:00
Remove unnecessary try/catch blocks in DirectoryRosterStore
This commit is contained in:
parent
4e43292f1d
commit
cf6076ce43
1 changed files with 3 additions and 14 deletions
|
@ -156,24 +156,13 @@ public class DirectoryRosterStore implements RosterStore {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean removeEntry(String bareJid, String version) {
|
public boolean removeEntry(String bareJid, String version) {
|
||||||
try {
|
return getBareJidFile(bareJid).delete() && setRosterVersion(version);
|
||||||
return getBareJidFile(bareJid).delete() && setRosterVersion(version);
|
|
||||||
}
|
|
||||||
catch (SecurityException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean resetEntries(Collection<Item> items, String version) {
|
public boolean resetEntries(Collection<Item> items, String version) {
|
||||||
try {
|
for (File file : fileDir.listFiles(rosterDirFilter)) {
|
||||||
for (File file : fileDir.listFiles(rosterDirFilter)) {
|
file.delete();
|
||||||
file.delete();
|
|
||||||
}
|
|
||||||
} catch (SecurityException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
for (Item item : items) {
|
for (Item item : items) {
|
||||||
if (!addEntryRaw(item)) {
|
if (!addEntryRaw(item)) {
|
||||||
|
|
Loading…
Reference in a new issue