Skip to content

Commit

Permalink
Fix null pointer in RandomIPGossip
Browse files Browse the repository at this point in the history
  • Loading branch information
vladamatena committed Nov 3, 2014
1 parent 03ea4cb commit 4f228b3
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,14 @@ public Collection<String> getRecipients(KnowledgeData data,
List<String> result = new LinkedList<>();

// Guard for no recipients
if (recipientSelectors != null && !recipientSelectors.isEmpty())
if (recipientSelectors == null)
return result;

// Add recipients from all selectors
for (DirectRecipientSelector selector: recipientSelectors) {
for (DirectRecipientSelector selector: recipientSelectors)
result.addAll(selector.getRecipients(data, sender));
}

// filter the owner of the data
// remove all
// Filter the owner of the data, remove all
while (result.remove(data.getMetaData().componentId));

return directGossipStrategy.filterRecipients(result);
Expand Down

0 comments on commit 4f228b3

Please sign in to comment.