mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-24 20:26:16 +10:00
code cleanup
- java 7 style generic - remove unused import
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package org.apache.hadoop.util;
|
||||
|
||||
import org.apache.hadoop.util.ShutdownHookManager;
|
||||
import org.springframework.beans.factory.DisposableBean;
|
||||
|
||||
public class ShutdownHookManagerProxy implements DisposableBean {
|
||||
|
||||
@@ -16,10 +16,6 @@
|
||||
|
||||
package com.navercorp.pinpoint.web.alarm;
|
||||
|
||||
import org.junit.Assert;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class MainCategoryTest {
|
||||
|
||||
// @Test
|
||||
|
||||
@@ -93,7 +93,7 @@ public class ReaderTest {
|
||||
@Override
|
||||
public java.util.List<Rule> selectRuleByApplicationId(String applicationId) {
|
||||
return new LinkedList<Rule>();
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
AlarmReader reader = new AlarmReader(dataCollectorFactory, applicationIndexDao, alarmService);
|
||||
|
||||
-2
@@ -1,7 +1,5 @@
|
||||
package com.navercorp.pinpoint.web.applicationmap.rawdata;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -21,7 +21,6 @@ import static org.junit.Assert.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.navercorp.pinpoint.common.bo.SpanBo;
|
||||
@@ -185,7 +184,7 @@ public class CallTreeTest {
|
||||
callTree.add(-1, makeSpanAlign(SYNC, (short) 21));
|
||||
callTree.add(-1, makeSpanAlign(SYNC, (short) 22));
|
||||
callTree.add(-1, makeSpanAlign(SYNC, (short) 23));
|
||||
} catch (Exception e) {
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
assertDepth("missing-case-1", callTree, expectResult);
|
||||
}
|
||||
@@ -217,7 +216,7 @@ public class CallTreeTest {
|
||||
callTree.add(4, makeSpanAlign(SYNC, (short) 15));
|
||||
callTree.add(-1, makeSpanAlign(SYNC, (short) 16));
|
||||
callTree.add(-1, makeSpanAlign(SYNC, (short) 17));
|
||||
} catch (Exception e) {
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
assertDepth("missing-case-2", callTree, expectResult);
|
||||
}
|
||||
@@ -233,7 +232,7 @@ public class CallTreeTest {
|
||||
// subTree.add(1, makeSpanAlign(ASYNC, (short) 0, -1, 1));
|
||||
subTree.add(2, makeSpanAlign(ASYNC, (short) 1, 2, 1));
|
||||
callTree.add(subTree);
|
||||
} catch (Exception e) {
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
assertDepth("missing-case-3", callTree, expectResult);
|
||||
}
|
||||
|
||||
@@ -17,13 +17,9 @@
|
||||
package com.navercorp.pinpoint.web.cluster;
|
||||
|
||||
import com.navercorp.pinpoint.common.util.NetUtils;
|
||||
import com.navercorp.pinpoint.rpc.MessageListener;
|
||||
import com.navercorp.pinpoint.rpc.PinpointSocket;
|
||||
import com.navercorp.pinpoint.rpc.client.PinpointClient;
|
||||
import com.navercorp.pinpoint.rpc.client.PinpointClientFactory;
|
||||
import com.navercorp.pinpoint.rpc.client.SimpleMessageListener;
|
||||
import com.navercorp.pinpoint.rpc.packet.RequestPacket;
|
||||
import com.navercorp.pinpoint.rpc.packet.SendPacket;
|
||||
import com.navercorp.pinpoint.web.cluster.connection.WebClusterConnectionManager;
|
||||
import com.navercorp.pinpoint.web.config.WebConfig;
|
||||
import com.navercorp.pinpoint.web.util.PinpointWebTestUtils;
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
|
||||
package com.navercorp.pinpoint.web.cluster;
|
||||
|
||||
import com.navercorp.pinpoint.common.Version;
|
||||
import com.navercorp.pinpoint.rpc.util.AssertUtils;
|
||||
import com.navercorp.pinpoint.thrift.dto.command.TCommandEcho;
|
||||
import com.navercorp.pinpoint.thrift.dto.command.TCommandTransferResponse;
|
||||
import com.navercorp.pinpoint.thrift.dto.command.TRouteResult;
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ public class ZookeeperClusterTest {
|
||||
|
||||
private static final String COLLECTOR_NODE_PATH = "/pinpoint-cluster/collector";
|
||||
private static final String COLLECTOR_TEST_NODE_PATH = "/pinpoint-cluster/collector/test";
|
||||
private static String CLUSTER_NODE_PATH;;
|
||||
private static String CLUSTER_NODE_PATH;
|
||||
|
||||
private static TestingServer ts = null;
|
||||
|
||||
|
||||
@@ -24,13 +24,10 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
import java.awt.Container;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.hamcrest.Matcher;
|
||||
import org.hamcrest.Matchers;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
|
||||
@@ -34,7 +34,6 @@ import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.test.context.web.WebAppConfiguration;
|
||||
import org.springframework.test.web.servlet.MockMvc;
|
||||
import org.springframework.test.web.servlet.MvcResult;
|
||||
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
||||
import org.springframework.web.context.WebApplicationContext;
|
||||
|
||||
|
||||
@@ -17,20 +17,14 @@
|
||||
package com.navercorp.pinpoint.web.filter;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.core.JsonParseException;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -12,8 +12,6 @@ import org.slf4j.LoggerFactory;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* @author emeroad
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,6 @@ package com.navercorp.pinpoint.web.mapper;
|
||||
|
||||
import static org.hamcrest.core.Is.*;
|
||||
import static org.junit.Assert.*;
|
||||
import static org.mockito.Matchers.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
import static com.navercorp.pinpoint.common.hbase.HBaseTables.*;
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package com.navercorp.pinpoint.web.service;
|
||||
|
||||
import com.navercorp.pinpoint.common.trace.BaseHistogramSchema;
|
||||
import com.navercorp.pinpoint.common.trace.HistogramSchema;
|
||||
import com.navercorp.pinpoint.common.trace.ServiceType;
|
||||
import com.navercorp.pinpoint.web.applicationmap.rawdata.*;
|
||||
import com.navercorp.pinpoint.web.dao.HostApplicationMapDao;
|
||||
|
||||
@@ -61,13 +61,13 @@ public class DateLimiterTest {
|
||||
try {
|
||||
limiter.limit(0, TimeUnit.DAYS.toMillis(2) + 1);
|
||||
Assert.fail();
|
||||
} catch (Exception e) {
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
|
||||
try {
|
||||
limiter.limit(TimeUnit.DAYS.toMillis(2), 0);
|
||||
Assert.fail();
|
||||
} catch (Exception e) {
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,13 +77,13 @@ public class DateLimiterTest {
|
||||
try {
|
||||
limiter.limit(new Range(0, TimeUnit.DAYS.toMillis(2) + 1));
|
||||
Assert.fail();
|
||||
} catch (Exception e) {
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
|
||||
try {
|
||||
limiter.limit(new Range(TimeUnit.DAYS.toMillis(2), 0));
|
||||
Assert.fail();
|
||||
} catch (Exception e) {
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ public class LimitUtilsTest {
|
||||
try {
|
||||
LimitUtils.checkRange(-1);
|
||||
Assert.fail();
|
||||
} catch (Exception e) {
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ public class TimeWindowTest {
|
||||
try {
|
||||
iterator.next();
|
||||
Assert.fail("no more element");
|
||||
} catch (Exception e) {
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
|
||||
TimeWindow window2 = new TimeWindow(new Range(0L, TimeUnit.MINUTES.toMillis(1)));
|
||||
@@ -55,7 +55,7 @@ public class TimeWindowTest {
|
||||
try {
|
||||
iterator2.next();
|
||||
Assert.fail("no more element");
|
||||
} catch (Exception e) {
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ public class RangeTest {
|
||||
try {
|
||||
Range range3 = new Range(0, -1);
|
||||
Assert.fail();
|
||||
} catch (Exception e) {
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user