Move null check into predicate function (#693)

* Move null check into predicate function

* Simplify null check
This commit is contained in:
Ivan Meredith 2017-01-11 11:52:08 +13:00 committed by GitHub
parent 623935beab
commit 9574ed6b06
1 changed files with 1 additions and 4 deletions

View File

@ -67,12 +67,9 @@ public class ActionProxiesImpl extends BlueActionProxy {
for(Action action : Iterables.filter(actions, new Predicate<Action>() {
@Override
public boolean apply(Action action) {
return !BANNED_ACTIONS.contains(action.getClass().getName());
return action != null && !BANNED_ACTIONS.contains(action.getClass().getName());
}
})){
if(action == null){
continue;
}
actionProxies.add(new ActionProxiesImpl(action, parent));
}
return actionProxies;