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


##########
shenyu-kubernetes-controller/src/main/java/org/apache/shenyu/k8s/parser/ContextPathParser.java:
##########
@@ -112,11 +112,14 @@ private List<IngressConfiguration> parseIngressRule(final 
V1IngressRule ingressR
                     }
                     conditionList.add(pathCondition);
                     SelectorData selectorData = createSelectorData(pathPath, 
conditionList);
-                    ContextMappingRuleHandle contextMappingRuleHandle = 
createContextMappingRuleHandle(annotations);
+                    String contextPath = 
annotations.get(IngressConstants.PLUGIN_CONTEXT_PATH_PATH);
                     List<RuleData> ruleDataList = new ArrayList<>();
-                    List<ConditionData> ruleConditionList = 
getRuleConditionList(annotations);
-                    RuleData ruleData = createRuleData(annotations, 
contextMappingRuleHandle, ruleConditionList);
-                    ruleDataList.add(ruleData);
+                    if (Objects.nonNull(contextPath)) {

Review Comment:
   Hi Liming, Thanks for the review. Have pushed the suggested fix. Please take 
a look.



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