Aias00 commented on code in PR #7031:
URL: https://github.com/apache/shenyu/pull/7031#discussion_r4213676605


##########
shenyu-kubernetes-controller/src/main/java/org/apache/shenyu/k8s/parser/ContextPathParser.java:
##########
@@ -122,16 +122,20 @@ private List<IngressConfiguration> parseIngressRule(final 
V1IngressRule ingressR
                     }
                     OperatorEnum operator = getOperator(path.getPathType());
                     ConditionData pathCondition = 
createPathCondition(pathPath, operator);
-                    List<ConditionData> conditionList = new ArrayList<>(2);
+                    String contextPath = 
annotations.get(IngressConstants.PLUGIN_CONTEXT_PATH_PATH);
+                    if (Objects.isNull(contextPath)) {

Review Comment:
   Non-blocking: the existing StringUtils.isBlank(...) guard above already 
skips null, empty, and whitespace-only values. Since contextPath is read from 
the same local annotations map, this null branch is unreachable. Please 
consider removing this duplicate guard while retaining the local variable 
passed to the helpers.



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