Skip to content

Commit

Permalink
MENFORCER-420: Remove redundant null check.
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Walton <joe@kafsemo.org>
  • Loading branch information
josephw committed May 29, 2022
1 parent 401e62c commit 9682cbb
Showing 1 changed file with 3 additions and 6 deletions.
Expand Up @@ -37,6 +37,8 @@
import java.util.HashSet;
import java.util.Set;

import javax.annotation.Nonnull;

/**
* Abstract Rule for banning dependencies.
*
Expand Down Expand Up @@ -120,13 +122,8 @@ protected CharSequence getErrorMessage( Artifact artifact )
return "Found Banned Dependency: " + artifact.getId() + System.lineSeparator();
}

private Set<Artifact> getDependenciesToCheck( EnforcerRuleHelper helper, ProjectBuildingRequest buildingRequest )
private Set<Artifact> getDependenciesToCheck( @Nonnull EnforcerRuleHelper helper, ProjectBuildingRequest buildingRequest )
{
if ( helper == null )
{
return getDependenciesToCheck( buildingRequest );
}

String cacheKey = buildingRequest.getProject().getId() + "_" + searchTransitive;

// check in the cache
Expand Down

0 comments on commit 9682cbb

Please sign in to comment.