Skip to content

Commit

Permalink
Remove imports from Traffic Router source files that were never used (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ocket8888 committed Sep 26, 2023
1 parent 4808c81 commit 40f0b57
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,9 @@
import org.apache.traffic_control.traffic_router.secure.KeyManager;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.tomcat.jni.SSL;
import org.apache.tomcat.util.net.NioChannel;
import org.apache.tomcat.util.net.NioEndpoint;
import org.apache.tomcat.util.net.SSLHostConfig;
import org.apache.tomcat.util.net.SSLHostConfigCertificate;
import org.apache.tomcat.util.net.SocketEvent;
import org.apache.tomcat.util.net.SocketProcessorBase;
import org.apache.tomcat.util.net.SocketWrapperBase;

import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -137,4 +132,3 @@ public void setProtocols(final String protocols) {
}

}

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

import javax.management.InstanceAlreadyExistsException;
import javax.management.MBeanServer;
import javax.management.ObjectName;
import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import java.net.InetAddress;
import java.util.Random;

import static org.junit.Assert.fail;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
Expand Down Expand Up @@ -203,4 +202,4 @@ public void run() {
}

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.apache.logging.log4j.core.appender.ConsoleAppender;
import org.apache.logging.log4j.core.layout.PatternLayout;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.experimental.categories.Category;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasItems;
import static org.hamcrest.core.IsCollectionContaining.hasItem;
import static org.junit.Assert.fail;

import org.junit.After;
Expand All @@ -52,20 +50,20 @@ public class StatsTest {
public void before() throws LifecycleException {
httpClient = HttpClientBuilder.create().build();
}

@After
public void after() throws Exception {
if (httpClient != null) httpClient.close();
}

@Test
public void itGetsApplicationStats() throws Exception {
HttpGet httpGet = new HttpGet("http://localhost:3333/crs/stats");

CloseableHttpResponse httpResponse = null;

try {

httpResponse = httpClient.execute(httpGet);
String responseContent = EntityUtils.toString(httpResponse.getEntity());

Expand Down Expand Up @@ -116,7 +114,7 @@ public void itGetsLocationsByIp() throws Exception {
HttpGet httpGet = new HttpGet("http://localhost:3333/crs/stats/ip/8.8.8.8");

CloseableHttpResponse response = null;

try {
response = httpClient.execute(httpGet);
String actual = EntityUtils.toString(response.getEntity());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
import static org.hamcrest.Matchers.anyOf;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.lessThan;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.junit.Assert.assertThat;
import static org.mockito.ArgumentMatchers.anyString;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.core.IsNull.nullValue;


public class CertificatesClientTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import java.security.spec.PKCS8EncodedKeySpec;

import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;

public class Pkcs1Test {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.ClassCastException;
import java.net.HttpURLConnection;
import java.net.SocketTimeoutException;
import java.net.URL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import java.io.IOException;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.security.GeneralSecurityException;
import java.security.KeyFactory;
import java.security.KeyPair;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.powermock.api.mockito.PowerMockito.mockStatic;

@RunWith(PowerMockRunner.class)
@PrepareForTest({DeliveryServiceCertificates.class, System.class})
Expand Down

0 comments on commit 40f0b57

Please sign in to comment.