Skip to content

Commit

Permalink
code format (apache#2730)
Browse files Browse the repository at this point in the history
* NullPointerException

* code rule

* code rule
  • Loading branch information
x-ultimate authored and CrazyHZM committed Dec 6, 2018
1 parent a664d1d commit 75c2f47
Show file tree
Hide file tree
Showing 16 changed files with 127 additions and 6 deletions.
103 changes: 102 additions & 1 deletion dubbo-compatible/src/main/java/com/alibaba/dubbo/common/URL.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
@Deprecated
public interface StatusChecker extends org.apache.dubbo.common.status.StatusChecker {

@Override
Status check();
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
@Deprecated
public interface Monitor extends org.apache.dubbo.monitor.Monitor {

@Override
com.alibaba.dubbo.common.URL getUrl();

void collect(com.alibaba.dubbo.common.URL statistics);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
@Deprecated
public interface Registry extends org.apache.dubbo.registry.Registry {

@Override
com.alibaba.dubbo.common.URL getUrl();

void register(com.alibaba.dubbo.common.URL url);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
@Deprecated
public interface Channel extends org.apache.dubbo.remoting.Channel {

@Override
com.alibaba.dubbo.common.URL getUrl();

@Override
com.alibaba.dubbo.remoting.ChannelHandler getChannelHandler();
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
@Deprecated
public interface Exporter<T> extends org.apache.dubbo.rpc.Exporter<T> {

@Override
Invoker<T> getInvoker();

class CompatibleExporter<T> implements Exporter<T> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public interface Filter extends org.apache.dubbo.rpc.Filter {

Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException;

@Override
default org.apache.dubbo.rpc.Result invoke(org.apache.dubbo.rpc.Invoker<?> invoker,
org.apache.dubbo.rpc.Invocation invocation)
throws org.apache.dubbo.rpc.RpcException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
@Deprecated
public interface Invocation extends org.apache.dubbo.rpc.Invocation {

@Override
Invoker<?> getInvoker();

default org.apache.dubbo.rpc.Invocation getOriginal() {
Expand Down Expand Up @@ -71,6 +72,7 @@ public Invoker<?> getInvoker() {
return new Invoker.CompatibleInvoker(delegate.getInvoker());
}

@Override
public org.apache.dubbo.rpc.Invocation getOriginal() {
return delegate;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
@Deprecated
public interface Invoker<T> extends org.apache.dubbo.rpc.Invoker<T> {

@Override
Result invoke(org.apache.dubbo.rpc.Invocation invocation) throws RpcException;

default org.apache.dubbo.rpc.Invoker<T> getOriginal() {
Expand Down Expand Up @@ -61,6 +62,7 @@ public void destroy() {
invoker.destroy();
}

@Override
public org.apache.dubbo.rpc.Invoker<T> getOriginal() {
return invoker;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,19 @@

package com.alibaba.dubbo.rpc.cluster;

import com.alibaba.dubbo.common.URL;

import org.apache.dubbo.rpc.Invocation;
import org.apache.dubbo.rpc.Invoker;
import org.apache.dubbo.rpc.RpcException;

import com.alibaba.dubbo.common.URL;

import java.util.List;
import java.util.stream.Collectors;

@Deprecated
public interface Directory<T> extends org.apache.dubbo.rpc.cluster.Directory<T> {

@Override
URL getUrl();

List<com.alibaba.dubbo.rpc.Invoker<T>> list(com.alibaba.dubbo.rpc.Invocation invocation) throws com.alibaba.dubbo.rpc.RpcException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
@Deprecated
public interface Router extends org.apache.dubbo.rpc.cluster.Router {

@Override
com.alibaba.dubbo.common.URL getUrl();

<T> List<com.alibaba.dubbo.rpc.Invoker<T>> route(List<com.alibaba.dubbo.rpc.Invoker<T>> invokers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
*/
package org.apache.dubbo.config.spring.beans.factory.annotation;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.dubbo.common.Constants;
import org.apache.dubbo.common.utils.StringUtils;
import org.apache.dubbo.config.annotation.Reference;
import org.apache.dubbo.config.spring.ReferenceBean;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.BeansException;
import org.springframework.beans.PropertyValues;
Expand Down Expand Up @@ -581,7 +582,9 @@ private static boolean nullSafeEquals(Object first, Object another) {
}

private String toPlainString(String[] array) {
if (array == null || array.length == 0) return "";
if (array == null || array.length == 0) {
return "";
}
StringBuilder buffer = new StringBuilder();
for (int i = 0; i < array.length; i++) {
if (i > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
@Deprecated
public interface GenericService extends org.apache.dubbo.rpc.service.GenericService {

@Override
Object $invoke(String method, String[] parameterTypes, Object[] args)
throws com.alibaba.dubbo.rpc.service.GenericException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public String getAttachment(String key, String defaultValue) {
return result;
}

@Override
public void setAttachment(String key, String value) {
attachments.put(key, value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public void start() {
this.started.set(true);
}

@Override
public void signalContextSwitch() {
RpcContext.restoreContext(storedContext);
RpcContext.restoreServerContext(storedServerContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ public String getAttachment(String key, String defaultValue) {
return getRpcResult().getAttachment(key, defaultValue);
}

@Override
public void setAttachment(String key, String value) {
getRpcResult().setAttachment(key, value);
}
Expand Down

0 comments on commit 75c2f47

Please sign in to comment.