Anded return statment after onFailure for the object dont send onSucces.
parent
f3ec49acc7
commit
259b4c2ae5
|
@ -42,6 +42,7 @@ public class GetGroupsCallback implements FutureCallback<List<BulletinBoardMessa
|
||||||
public void onSuccess(List<BulletinBoardMessage> messages) {
|
public void onSuccess(List<BulletinBoardMessage> messages) {
|
||||||
if (messages.isEmpty()){
|
if (messages.isEmpty()){
|
||||||
callback.onFailure(new NotFoundException("Voter permissions not found in database"));
|
callback.onFailure(new NotFoundException("Voter permissions not found in database"));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
BulletinBoardMessage message = getLatestMessage(messages);
|
BulletinBoardMessage message = getLatestMessage(messages);
|
||||||
|
|
|
@ -22,6 +22,7 @@ public class HasVotedCallback implements FutureCallback<List<BulletinBoardMessag
|
||||||
public void onSuccess(List<BulletinBoardMessage> messages) {
|
public void onSuccess(List<BulletinBoardMessage> messages) {
|
||||||
if (messages.isEmpty()){
|
if (messages.isEmpty()){
|
||||||
callback.onSuccess(false);
|
callback.onSuccess(false);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
callback.onSuccess(true);
|
callback.onSuccess(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ public class GetVoterCallback implements FutureCallback<List<BulletinBoardMessag
|
||||||
public void onSuccess(List<BulletinBoardMessage> messages) {
|
public void onSuccess(List<BulletinBoardMessage> messages) {
|
||||||
if(messages.isEmpty()){
|
if(messages.isEmpty()){
|
||||||
callback.onFailure(new NotFoundException("Voter info not found in database."));
|
callback.onFailure(new NotFoundException("Voter info not found in database."));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
BulletinBoardMessage latestMessage = getLatestMessage(messages);
|
BulletinBoardMessage latestMessage = getLatestMessage(messages);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue