Anded return statment after onFailure for the object dont send onSucces.

Voter-Registry
Vladimir Eliezer Tokarev 2016-03-26 04:13:45 -07:00
parent f3ec49acc7
commit 259b4c2ae5
3 changed files with 3 additions and 0 deletions

View File

@ -42,6 +42,7 @@ public class GetGroupsCallback implements FutureCallback<List<BulletinBoardMessa
public void onSuccess(List<BulletinBoardMessage> messages) {
if (messages.isEmpty()){
callback.onFailure(new NotFoundException("Voter permissions not found in database"));
return;
}
BulletinBoardMessage message = getLatestMessage(messages);

View File

@ -22,6 +22,7 @@ public class HasVotedCallback implements FutureCallback<List<BulletinBoardMessag
public void onSuccess(List<BulletinBoardMessage> messages) {
if (messages.isEmpty()){
callback.onSuccess(false);
return;
}
callback.onSuccess(true);
}

View File

@ -27,6 +27,7 @@ public class GetVoterCallback implements FutureCallback<List<BulletinBoardMessag
public void onSuccess(List<BulletinBoardMessage> messages) {
if(messages.isEmpty()){
callback.onFailure(new NotFoundException("Voter info not found in database."));
return;
}
BulletinBoardMessage latestMessage = getLatestMessage(messages);