Skip to content

Commit

Permalink
Fixed potential NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Jan 27, 2016
1 parent c06efd8 commit adecb4e
Showing 1 changed file with 7 additions and 3 deletions.
Expand Up @@ -71,11 +71,15 @@ default boolean isEnabled(UIContext context)
default boolean supports(Stack stack)
{
// By default, check if the required facets are supported by the given stack
for (Class<? extends ProjectFacet> requiredFacet : getRequiredFacets())
Iterable<Class<? extends ProjectFacet>> requiredFacets = getRequiredFacets();
if (stack != null && requiredFacets != null)
{
if (stack.supports(requiredFacet))
for (Class<? extends ProjectFacet> requiredFacet : requiredFacets)
{
return true;
if (stack.supports(requiredFacet))
{
return true;
}
}
}
return false;
Expand Down

0 comments on commit adecb4e

Please sign in to comment.