diff --git a/voter-registry/src/main/java/meerkat/registry/AsyncRegistryCallbacks/GetGroupsCallback.java b/voter-registry/src/main/java/meerkat/registry/AsyncRegistryCallbacks/GetGroupsCallback.java index 8012fb1..2bb3e03 100644 --- a/voter-registry/src/main/java/meerkat/registry/AsyncRegistryCallbacks/GetGroupsCallback.java +++ b/voter-registry/src/main/java/meerkat/registry/AsyncRegistryCallbacks/GetGroupsCallback.java @@ -42,6 +42,7 @@ public class GetGroupsCallback implements FutureCallback messages) { if (messages.isEmpty()){ callback.onFailure(new NotFoundException("Voter permissions not found in database")); + return; } BulletinBoardMessage message = getLatestMessage(messages); diff --git a/voter-registry/src/main/java/meerkat/registry/AsyncRegistryCallbacks/HasVotedCallback.java b/voter-registry/src/main/java/meerkat/registry/AsyncRegistryCallbacks/HasVotedCallback.java index 73570a5..091f243 100644 --- a/voter-registry/src/main/java/meerkat/registry/AsyncRegistryCallbacks/HasVotedCallback.java +++ b/voter-registry/src/main/java/meerkat/registry/AsyncRegistryCallbacks/HasVotedCallback.java @@ -22,6 +22,7 @@ public class HasVotedCallback implements FutureCallback messages) { if (messages.isEmpty()){ callback.onSuccess(false); + return; } callback.onSuccess(true); } diff --git a/voter-registry/src/main/java/meerkat/registry/AsyncRegistryCallbacks/getVoterCallback.java b/voter-registry/src/main/java/meerkat/registry/AsyncRegistryCallbacks/getVoterCallback.java index b7b503a..ce244ec 100644 --- a/voter-registry/src/main/java/meerkat/registry/AsyncRegistryCallbacks/getVoterCallback.java +++ b/voter-registry/src/main/java/meerkat/registry/AsyncRegistryCallbacks/getVoterCallback.java @@ -27,6 +27,7 @@ public class GetVoterCallback implements FutureCallback messages) { if(messages.isEmpty()){ callback.onFailure(new NotFoundException("Voter info not found in database.")); + return; } BulletinBoardMessage latestMessage = getLatestMessage(messages);