Skip to content

Commit

Permalink
Optimize imports and authors. (sofastack#392)
Browse files Browse the repository at this point in the history
  • Loading branch information
ujjboy authored Dec 5, 2018
1 parent e57d62a commit aa692c4
Show file tree
Hide file tree
Showing 54 changed files with 68 additions and 120 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
*/
package com.alipay.sofa.rpc.client;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantReadWriteLock;

import com.alipay.sofa.rpc.bootstrap.ConsumerBootstrap;
import com.alipay.sofa.rpc.common.RpcConstants;
import com.alipay.sofa.rpc.common.struct.ConcurrentHashSet;
import com.alipay.sofa.rpc.ext.Extension;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantReadWriteLock;

/**
* 只支持单个分组的地址选择器(额外存一个直连分组)
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

import com.alipay.sofa.rpc.client.ProviderInfo;
import com.alipay.sofa.rpc.core.request.SofaRequest;
import com.alipay.sofa.rpc.log.Logger;
import com.alipay.sofa.rpc.log.LoggerFactory;
import org.junit.Assert;
import org.junit.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

import com.alipay.sofa.rpc.client.ProviderInfo;
import com.alipay.sofa.rpc.core.request.SofaRequest;
import com.alipay.sofa.rpc.log.Logger;
import com.alipay.sofa.rpc.log.LoggerFactory;
import org.junit.Assert;
import org.junit.Test;

Expand All @@ -34,8 +32,6 @@
*/
public class WeightRoundRobinLoadBalancerTest extends BaseLoadBalancerTest {

private static final Logger LOGGER = LoggerFactory.getLogger(WeightRoundRobinLoadBalancerTest.class);

@Test
public void doSelect() throws Exception {
WeightRoundRobinLoadBalancer loadBalancer = new WeightRoundRobinLoadBalancer(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
import com.alipay.sofa.rpc.config.ConsumerConfig;

/**
* @author bystander
* @version $Id: ConsumerSubEvent.java, v 0.1 2018年11月07日 9:41 PM bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public class ConsumerSubEvent implements Event {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
import com.alipay.sofa.rpc.config.ProviderConfig;

/**
* @author bystander
* @version $Id: ProviderPubEvent.java, v 0.1 2018年11月07日 9:41 PM bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public class ProviderPubEvent implements Event {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Iterator;

import static com.alipay.sofa.rpc.common.json.JSON.getSerializeFields;

Expand Down Expand Up @@ -242,7 +242,7 @@ private static <T> T[] array2Array(Object[] src, Class<T> componentType) {
*
* @param src 原始对象
* @param clazz 期望的对象
* @param <T> 反序列化类型
* @param <T> 反序列化类型
* @return 转换后结果
*/
public static <T> T deserializeByType(Object src, Class<T> clazz) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
import com.alipay.sofa.rpc.common.Version;
import com.alipay.sofa.rpc.common.utils.CommonUtils;
import com.alipay.sofa.rpc.common.utils.StringUtils;
import com.alipay.sofa.rpc.config.*;
import com.alipay.sofa.rpc.config.ApplicationConfig;
import com.alipay.sofa.rpc.config.MethodConfig;
import com.alipay.sofa.rpc.config.ProviderConfig;
import com.alipay.sofa.rpc.config.RegistryConfig;
import com.alipay.sofa.rpc.config.ServerConfig;
import com.alipay.sofa.rpc.ext.Extension;

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
import java.util.concurrent.Future;

/**
* @author bystander
* @version $Id: DubooServerTest.java, v 0.1 2017年10月30日 下午9:23 bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public class DubooServerTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@

/**
*
* @author bystander
* @version $Id: DemoServiceImpl.java, v 0.1 2017年10月30日 下午9:24 bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public class DemoServiceImpl implements DemoService {
public String sayHello(String name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
import org.junit.Assert;
import org.junit.Test;

/**
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public class DefaultProviderBootstrapTest {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@
import com.alipay.sofa.rpc.client.aft.bean.HelloServiceTimeOutImpl;
import com.alipay.sofa.rpc.context.RpcInternalContext;
import com.alipay.sofa.rpc.context.RpcInvokeContext;
import com.alipay.sofa.rpc.log.Logger;
import com.alipay.sofa.rpc.log.LoggerFactory;
import org.junit.After;
import org.junit.Before;

/**
* @author bystander
* @version $Id: FaultBaseTest.java, v 0.1 2017年11月16日 下午3:14 bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public abstract class FaultBaseServiceTest extends FaultBaseTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
import java.util.concurrent.Callable;

/**
* @author bystander
* @version $Id: FaultBaseTest.java, v 0.1 2017年11月16日 下午3:14 bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public abstract class FaultBaseTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
package com.alipay.sofa.rpc.client.aft.bean;

/**
* @author bystander
* @version $Id: FaultHelloService.java, v 0.1 2017年11月17日 下午3:47 bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public interface FaultHelloService {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
package com.alipay.sofa.rpc.client.aft.bean;

/**
* @author bystander
* @version $Id: FaultHelloService.java, v 0.1 2017年11月17日 下午3:47 bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public interface FaultHelloService2 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package com.alipay.sofa.rpc.log.factory;

import org.junit.Assert;
import org.slf4j.Logger;
import org.junit.Test;
import org.slf4j.Logger;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import com.alipay.sofa.rpc.context.RpcRunningState;
import com.alipay.sofa.rpc.core.request.SofaRequest;
import com.alipay.sofa.rpc.core.response.SofaResponse;
import com.alipay.sofa.rpc.metrics.lookout.RpcLookout;
import com.alipay.sofa.rpc.metrics.lookout.RpcClientLookoutModel;
import com.alipay.sofa.rpc.metrics.lookout.RpcLookout;
import com.alipay.sofa.rpc.metrics.lookout.RpcServerLookoutModel;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
import java.util.Random;

/**
* @author bystander
* @version $Id: LocalRegistryHelperTest.java, v 0.1 2018年11月07日 11:34 AM bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public class LocalRegistryHelperTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
import java.net.URL;

/**
* @author bystander
* @version $Id: MeshApiClient.java, v 0.1 2018年03月27日 2:24 PM bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public class MeshApiClient {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
import java.util.Map;

/**
* @author bystander
* @version $Id: ApplicationInfoRequest.java, v 0.1 2018年04月20日 3:19 PM bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public class ApplicationInfoRequest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
package com.alipay.sofa.rpc.registry.mesh.model;

/**
* @author bystander
* @version $Id: ApplicationInfoResult.java, v 0.1 2018年04月20日 3:21 PM bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public class ApplicationInfoResult {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
package com.alipay.sofa.rpc.registry.mesh.model;

/**
* @author bystander
* @version $Id: MeshEndpoint.java, v 0.1 2018年04月20日 3:08 PM bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public class MeshConstants {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
package com.alipay.sofa.rpc.registry.mesh.model;

/**
* @author bystander
* @version $Id: MeshEndpoint.java, v 0.1 2018年04月20日 3:08 PM bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public class MeshEndpoint {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
package com.alipay.sofa.rpc.registry.mesh.model;

/**
* @author bystander
* @version $Id: ProviderMetaInfo.java, v 0.1 2018年04月03日 11:18 AM bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public class ProviderMetaInfo {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
package com.alipay.sofa.rpc.registry.mesh.model;

/**
* @author bystander
* @version $Id: PublishServiceRequest.java, v 0.1 2018年04月03日 11:27 AM bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public class PublishServiceRequest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
package com.alipay.sofa.rpc.registry.mesh.model;

/**
* @author bystander
* @version $Id: PublishServiceRequest.java, v 0.1 2018年04月03日 11:27 AM bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public class PublishServiceResult {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
package com.alipay.sofa.rpc.registry.mesh.model;

/**
* @author bystander
* @version $Id: PublishServiceRequest.java, v 0.1 2018年04月03日 11:27 AM bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public class SubscribeServiceRequest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
import java.util.List;

/**
* @author bystander
* @version $Id: PublishServiceRequest.java, v 0.1 2018年04月03日 11:27 AM bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public class SubscribeServiceResult {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
package com.alipay.sofa.rpc.registry.mesh.model;

/**
* @author bystander
* @version $Id: PublishServiceRequest.java, v 0.1 2018年04月03日 11:27 AM bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public class UnPublishServiceRequest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
package com.alipay.sofa.rpc.registry.mesh.model;

/**
* @author bystander
* @version $Id: PublishServiceRequest.java, v 0.1 2018年04月03日 11:27 AM bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public class UnPublishServiceResult {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
package com.alipay.sofa.rpc.registry.mesh.model;

/**
* @author bystander
* @version $Id: PublishServiceRequest.java, v 0.1 2018年04月03日 11:27 AM bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public class UnSubscribeServiceRequest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
package com.alipay.sofa.rpc.registry.mesh.model;

/**
* @author bystander
* @version $Id: PublishServiceRequest.java, v 0.1 2018年04月03日 11:27 AM bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public class UnSubscribeServiceResult {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
import org.junit.Test;

/**
* @author bystander
* @version $Id: MeshApiClientTest.java, v 0.1 2018年08月07日 12:04 PM bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public class MeshApiClientTest extends BaseMeshTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
import java.net.InetSocketAddress;

/**
* @author bystander
* @version $Id: HttpMockServer.java, v 0.1 2018年08月09日 7:52 AM bystander Exp $
* @author <a href=mailto:[email protected]>leizhiyuan</a>
*/
public class HttpMockServer {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@
*/
package com.alipay.sofa.rpc.registry.zk;

import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;

import com.alipay.sofa.rpc.base.Destroyable;
import com.alipay.sofa.rpc.config.RegistryConfig;
import com.alipay.sofa.rpc.registry.RegistryFactory;
import com.alipay.sofa.rpc.registry.zk.base.BaseZkTest;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;

/**
* @author tian
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
import java.util.Map;

/**
* @author <a href="mailto:[email protected]">LiWei.Liengen</a>
* @version $Id: ZookeeperRegistryHelperTest.java, v 0.1 2018年04月25日 下午7:09 LiWei.Liengen Exp $
* @author <a href="mailto:[email protected]">LiWei.Liangen</a>
*/
public class ZookeeperRegistryHelperTest {

Expand Down
Loading

0 comments on commit aa692c4

Please sign in to comment.