This is an automated email from the ASF dual-hosted git repository. liuhongyu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/shenyu.git
The following commit(s) were added to refs/heads/master by this push: new eb176ed5f9 [type:fix] SpringCloudParser MetaData null data. (#5737) eb176ed5f9 is described below commit eb176ed5f98fb9ed8be435e0081344c2d4466268 Author: zhengpeng <847850...@qq.com> AuthorDate: Mon Nov 11 18:57:04 2024 +0800 [type:fix] SpringCloudParser MetaData null data. (#5737) * [type:fix] SpringCloudParser MetaData null data. * [type:fix] SpringCloudParser MetaData null data. * [type:fix] cli. --------- Co-authored-by: aias00 <rok...@163.com> Co-authored-by: aias00 <liuhon...@apache.org> --- .../main/java/org/apache/shenyu/k8s/parser/SpringCloudParser.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/shenyu-kubernetes-controller/src/main/java/org/apache/shenyu/k8s/parser/SpringCloudParser.java b/shenyu-kubernetes-controller/src/main/java/org/apache/shenyu/k8s/parser/SpringCloudParser.java index 058bc93753..a1f05c12b1 100644 --- a/shenyu-kubernetes-controller/src/main/java/org/apache/shenyu/k8s/parser/SpringCloudParser.java +++ b/shenyu-kubernetes-controller/src/main/java/org/apache/shenyu/k8s/parser/SpringCloudParser.java @@ -59,7 +59,6 @@ import org.slf4j.LoggerFactory; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; @@ -383,8 +382,7 @@ public class SpringCloudParser implements K8sResourceParser<V1Ingress> { LOG.error("spring cloud metadata is error, please check spring cloud service. annotations: [{}]", annotations); throw new ShenyuException(annotations + " is is missing."); } - MetaData metaData = new MetaData(); - MetaData.builder() + MetaData metaData = MetaData.builder() .appName(annotations.get(IngressConstants.PLUGIN_SPRING_CLOUD_APP_NAME)) .path(annotations.get(IngressConstants.PLUGIN_SPRING_CLOUD_PATH)) .rpcType(annotations.get(IngressConstants.PLUGIN_SPRING_CLOUD_RPC_TYPE)) @@ -394,6 +392,6 @@ public class SpringCloudParser implements K8sResourceParser<V1Ingress> { .parameterTypes(annotations.getOrDefault(IngressConstants.PLUGIN_SPRING_CLOUD_PARAMENT_TYPE, "")) .enabled(true) .build(); - return new IngressConfiguration(selectorData, Arrays.asList(ruleData), Arrays.asList(metaData)); + return new IngressConfiguration(selectorData, Collections.singletonList(ruleData), Collections.singletonList(metaData)); } }