Skip to content

Commit

Permalink
Polish apache#3355 : fix the issues in samples
Browse files Browse the repository at this point in the history
  • Loading branch information
mercyblitz committed Jan 30, 2019
1 parent 5026c70 commit 4ad9aeb
Showing 1 changed file with 0 additions and 17 deletions.
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
}


Expand Down

0 comments on commit 4ad9aeb

Please sign in to comment.