From 4ad9aeb947fa5fd2b510d07481cf37498b1977a6 Mon Sep 17 00:00:00 2001 From: mercyblitz Date: Wed, 30 Jan 2019 16:24:23 +0800 Subject: [PATCH] Polish apache/incubator-dubbo#3355 : fix the issues in samples --- .../annotation/ReferenceBeanBuilder.java | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/dubbo-config/dubbo-config-spring/src/main/java/com/alibaba/dubbo/config/spring/beans/factory/annotation/ReferenceBeanBuilder.java b/dubbo-config/dubbo-config-spring/src/main/java/com/alibaba/dubbo/config/spring/beans/factory/annotation/ReferenceBeanBuilder.java index 27de58bf71e..9b92d214169 100644 --- a/dubbo-config/dubbo-config-spring/src/main/java/com/alibaba/dubbo/config/spring/beans/factory/annotation/ReferenceBeanBuilder.java +++ b/dubbo-config/dubbo-config-spring/src/main/java/com/alibaba/dubbo/config/spring/beans/factory/annotation/ReferenceBeanBuilder.java @@ -31,7 +31,6 @@ import java.beans.PropertyEditorSupport; import java.util.Map; -import static com.alibaba.dubbo.common.Constants.DEFAULT_PROTOCOL; import static com.alibaba.dubbo.config.spring.util.BeanFactoryUtils.getOptionalBean; import static com.alibaba.dubbo.config.spring.util.ObjectUtils.of; import static org.springframework.util.StringUtils.commaDelimitedListToStringArray; @@ -123,22 +122,6 @@ public void setAsText(String text) throws java.lang.IllegalArgumentException { // Bind annotation attributes dataBinder.bind(new AnnotationPropertyValuesAdapter(reference, applicationContext.getEnvironment(), IGNORE_FIELD_NAMES)); - setProtocolIfAbsent(reference, referenceBean); - } - - /** - * If ReferenceBean.protocol is empty and @Reference.protocol() is the default value, - * ReferenceBean.protocol is about to set the default protocol forcibly. - * - * @param reference {@link Reference} annotation - * @param referenceBean {@link ReferenceBean} Object - * @since 2.6.6 - */ - private void setProtocolIfAbsent(Reference reference, ReferenceBean referenceBean) { - if (!StringUtils.hasText(referenceBean.getProtocol()) - && DEFAULT_PROTOCOL.equals(reference.protocol())) { - referenceBean.setProtocol(DEFAULT_PROTOCOL); - } }