Skip to content

Commit

Permalink
Merge 1a6679c into 8ac5031
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsam94 committed Dec 9, 2017
2 parents 8ac5031 + 1a6679c commit 2d63387
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public <T> Field<T> create(int number, String name, java.lang.reflect.Field fiel
RuntimeMapField<T, Object, Object> runtimeMapField =
(RuntimeMapField<T, Object, Object>) org.create(number, name, field, strategy);

return new RuntimeMapFieldProtobuf<T>(runtimeMapField, field);
return new RuntimeMapFieldProtobuf<>(runtimeMapField, field);
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class TestAbstractDeserializer extends AbstractDeserializer {

static ReaderHelpData readerHelpData = Mockito.mock(ReaderHelpData.class);

static Map<String, ReaderHelpData> readerHelpDataMap = new HashMap<String, ReaderHelpData>();
static Map<String, ReaderHelpData> readerHelpDataMap = new HashMap<>();

public static void setReaderHelpDataMap(Map<String, ReaderHelpData> readerHelpDataMap) {
TestAbstractDeserializer.readerHelpDataMap = readerHelpDataMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class PathRegExp {

protected final Pattern pattern;

protected final List<String> varNames = new ArrayList<String>();
protected final List<String> varNames = new ArrayList<>();

public static String ensureEndWithSlash(String path) {
if (path.endsWith(SLASH)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class ConfigCenterConfigurationSourceImpl implements ConfigCenterConfigur

private final Map<String, Object> valueCache = Maps.newConcurrentMap();

private final List<WatchedUpdateListener> listeners = new CopyOnWriteArrayList<WatchedUpdateListener>();
private final List<WatchedUpdateListener> listeners = new CopyOnWriteArrayList<>();

private UpdateHandler updateHandler = new UpdateHandler();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ public static SignRequest createSignRequest(String method, String endpoint, Map<
if (!queryParams.containsKey(key)) {
queryParams.put(key, new String[] {value});
} else {
List<String> vals = new ArrayList<String>(Arrays.asList(queryParams.get(key)));
List<String> vals = new ArrayList<>(Arrays.asList(queryParams.get(key)));
vals.add(value);
queryParams.put(key, vals.toArray(new String[vals.size()]));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void name() {

@Test
public void testLoadBalancerFullOperationWithoutException() {
List<Server> newServers = new ArrayList<Server>();
List<Server> newServers = new ArrayList<>();
Server server = Mockito.mock(Server.class);
newServers.add(server);

Expand All @@ -66,7 +66,7 @@ public void testLoadBalancerFullOperationWithoutException() {
@Test
public void testAddServerException() {
boolean status = true;
List<Server> newServers = new ArrayList<Server>();
List<Server> newServers = new ArrayList<>();
Server server = Mockito.mock(Server.class);

newServers.add(server);
Expand All @@ -87,7 +87,7 @@ public void testAddServerException() {
@Test
public void testServerListException() {
boolean status = true;
List<Server> newServers = new ArrayList<Server>();
List<Server> newServers = new ArrayList<>();
Server server = Mockito.mock(Server.class);

newServers.add(server);
Expand All @@ -108,7 +108,7 @@ public void testServerListException() {
@Test
public void testMarkServerDownException() {
boolean status = true;
List<Server> newServers = new ArrayList<Server>();
List<Server> newServers = new ArrayList<>();
Server server = Mockito.mock(Server.class);

newServers.add(server);
Expand Down Expand Up @@ -137,7 +137,7 @@ public void testFilter() {

@Test
public void testGetAllServers() {
List<Server> servers = new ArrayList<Server>();
List<Server> servers = new ArrayList<>();
Server server = Mockito.mock(Server.class);
servers.add(server);
loadBalancer.setServerList(servers);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void setup() {
public void testGetAvailableAddress(@Injectable ServiceRegistryConfig config,
@Injectable InstanceCacheManager cacheManager,
@Injectable InstanceCache cache) {
ArrayList<IpPort> ipPortList = new ArrayList<IpPort>();
ArrayList<IpPort> ipPortList = new ArrayList<>();
ipPortList.add(new IpPort("127.0.0.1", 9980));
ipPortList.add(new IpPort("127.0.0.1", 9981));

Expand Down Expand Up @@ -139,7 +139,7 @@ public void testGetAvailableAddress(@Injectable ServiceRegistryConfig config,
@Test
public void testCreateServiceRegistryCacheWithInstanceCache() {

List<MicroserviceInstance> list = new ArrayList<MicroserviceInstance>();
List<MicroserviceInstance> list = new ArrayList<>();
MicroserviceInstance e1 = new MicroserviceInstance();
list.add(e1);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ protected ServiceRegistryClient createServiceRegistryClient() {

@Test
public void testLifeCycle(@Injectable ServiceRegistryConfig config, @Injectable MicroserviceDefinition definition) {
ArrayList<IpPort> ipPortList = new ArrayList<IpPort>();
ArrayList<IpPort> ipPortList = new ArrayList<>();
ipPortList.add(new IpPort("127.0.0.1", 9980));
ipPortList.add(new IpPort("127.0.0.1", 9981));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void testSendException() throws Exception {
AsyncResponse asyncResp = Mockito.mock(AsyncResponse.class);
commonHighwayMock(invocation);

Holder<Boolean> sended = new Holder<Boolean>(false);
Holder<Boolean> sended = new Holder<>(false);
new MockUp<HighwayClient>() {
@Mock
public void send(Invocation invocation, AsyncResponse asyncResp) throws Exception {
Expand Down

0 comments on commit 2d63387

Please sign in to comment.