Skip to content

Commit

Permalink
Merge pull request #3333, add @OverRide for sub-class method.
Browse files Browse the repository at this point in the history
  • Loading branch information
LiZhenNet authored and chickenlj committed Jan 24, 2019
1 parent 9cdb2f0 commit 15faa9b
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ static Optional<List<Configurator>> toConfigurators(List<URL> urls) {
* 1. the url with a specific host ip should have higher priority than 0.0.0.0
* 2. if two url has the same host, compare by priority value;
*/
@Override
default int compareTo(Configurator o) {
if (o == null) {
return -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public void setForce(boolean force) {
this.force = force;
}

@Override
public int getPriority() {
return priority;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@
@Deprecated
public interface Protocol extends org.apache.dubbo.rpc.Protocol {

<T> Exporter<T> export(Invoker <T> invoker) throws RpcException;
<T> Exporter<T> export(Invoker<T> invoker) throws RpcException;

<T> Invoker<T> refer(Class<T> aClass, URL url) throws RpcException;

@Override
default <T> org.apache.dubbo.rpc.Exporter<T> export(org.apache.dubbo.rpc.Invoker<T> invoker) throws RpcException {
return this.export(new Invoker.CompatibleInvoker<>(invoker));
}

@Override
default <T> org.apache.dubbo.rpc.Invoker<T> refer(Class<T> aClass, org.apache.dubbo.common.URL url) throws RpcException {
return this.refer(aClass, new URL(url));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package org.apache.dubbo.config.spring.beans.factory.annotation;

import com.alibaba.dubbo.config.annotation.Reference;

import org.apache.dubbo.common.utils.CollectionUtils;
import org.apache.dubbo.config.ConsumerConfig;
import org.apache.dubbo.config.spring.ReferenceBean;
Expand Down Expand Up @@ -104,7 +103,7 @@ protected void preConfigureBean(Reference reference, ReferenceBean referenceBean
dataBinder.registerCustomEditor(String.class, "filter", new StringTrimmerEditor(true));
dataBinder.registerCustomEditor(String.class, "listener", new StringTrimmerEditor(true));
dataBinder.registerCustomEditor(Map.class, "parameters", new PropertyEditorSupport() {

@Override
public void setAsText(String text) throws java.lang.IllegalArgumentException {
// Trim all whitespace
String content = StringUtils.trimAllWhitespace(text);
Expand Down Expand Up @@ -161,7 +160,7 @@ protected void postConfigureBean(Reference annotation, ReferenceBean bean) throw
}

public static CompatibleReferenceBeanBuilder create(Reference annotation, ClassLoader classLoader,
ApplicationContext applicationContext) {
ApplicationContext applicationContext) {
return new CompatibleReferenceBeanBuilder(annotation, classLoader, applicationContext);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public final Class<A> getAnnotationType() {
return annotationType;
}

@Override
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
Assert.isInstanceOf(ConfigurableListableBeanFactory.class, beanFactory,
"AnnotationInjectedBeanPostProcessor requires a ConfigurableListableBeanFactory");
Expand Down Expand Up @@ -293,6 +294,7 @@ public void setBeanClassLoader(ClassLoader classLoader) {
this.classLoader = classLoader;
}

@Override
public void setEnvironment(Environment environment) {
this.environment = environment;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ protected void preConfigureBean(Reference reference, ReferenceBean referenceBean
dataBinder.registerCustomEditor(String.class, "filter", new StringTrimmerEditor(true));
dataBinder.registerCustomEditor(String.class, "listener", new StringTrimmerEditor(true));
dataBinder.registerCustomEditor(Map.class, "parameters", new PropertyEditorSupport() {

@Override
public void setAsText(String text) throws java.lang.IllegalArgumentException {
// Trim all whitespace
String content = StringUtils.trimAllWhitespace(text);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.apache.dubbo.remoting.zookeeper.support.AbstractZookeeperTransporter;

public class CuratorZookeeperTransporter extends AbstractZookeeperTransporter {

@Override
public ZookeeperClient createZookeeperClient(URL url) {
return new CuratorZookeeperClient(url);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public abstract class AbstractZookeeperTransporter implements ZookeeperTransport
* @param url
* @return
*/
@Override
public ZookeeperClient connect(URL url) {
ZookeeperClient zookeeperClient;
List<String> addressList = getURLBackupAddress(url);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.apache.dubbo.remoting.zookeeper.support.AbstractZookeeperTransporter;

public class ZkclientZookeeperTransporter extends AbstractZookeeperTransporter {

@Override
public ZookeeperClient createZookeeperClient(URL url) {
return new ZkclientZookeeperClient(url);
}
Expand Down

0 comments on commit 15faa9b

Please sign in to comment.