slawekjaranowski commented on code in PR #152:
URL: https://github.com/apache/maven-enforcer/pull/152#discussion_r883926656


##########
enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractBanDependencies.java:
##########
@@ -120,6 +120,36 @@ protected CharSequence getErrorMessage( Artifact artifact )
         return "Found Banned Dependency: " + artifact.getId() + 
System.lineSeparator();
     }
 
+    private Set<Artifact> getDependenciesToCheck( EnforcerRuleHelper helper, 
ProjectBuildingRequest buildingRequest )
+    {
+        if ( helper == null )
+        {
+            return getDependenciesToCheck( buildingRequest );
+        }
+
+        String cacheKey = buildingRequest.getProject().getId() + "_" + 
searchTransitive;
+
+        // check in the cache
+        if ( helper.getContainer().getContext().contains( cacheKey ) )

Review Comment:
   I added comments in jira.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to