exceptionfactory commented on code in PR #8682:
URL: https://github.com/apache/nifi/pull/8682#discussion_r1591784352


##########
nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/flowanalysis/StandardFlowAnalyzer.java:
##########
@@ -250,6 +260,28 @@ private void analyzeProcessGroup(
         processGroup.getProcessGroups().forEach(childProcessGroup -> 
analyzeProcessGroup(childProcessGroup, flowAnalysisRules, groupViolations, 
componentToRuleViolations));
     }
 
+    private boolean isWithinScope(FlowAnalysisRuleNode ruleNode, String 
groupIdentifier) {
+        final String ruleScope = ruleNode.getScope();
+
+        while (groupIdentifier != null) {
+            if (ruleScope == null || ruleScope.isBlank()) {
+                return true;
+            }
+
+            final HashSet<String> scopedProcessGroupIds = new 
HashSet<>(Arrays.asList(ruleScope.split("\\s*,\\s*")));

Review Comment:
   As noted on the Jira issue, this approach should be refactored to avoid 
splitting during rule evaluation and instead storing the values as a List of 
strings.



-- 
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