Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 3344a51

Browse files
author
John Gardiner Myers
committed
Remove code specific to unsupported Java versions
1 parent 401714f commit 3344a51

6 files changed

Lines changed: 4 additions & 195 deletions

File tree

discovery/src/main/java/com/proofpoint/discovery/client/ServiceTypeImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ public String value()
3939
@Override
4040
public String toString()
4141
{
42-
var isJava11 = System.getProperty("java.version").startsWith("11.");
43-
return String.format("@%s(%s\"%s\")", ServiceType.class.getName(), isJava11 ? "value=" : "", value.replaceAll("([\\\\\"])", "\\\\$1"));
42+
return String.format("@%s(%s\"%s\")", ServiceType.class.getName(), "", value.replaceAll("([\\\\\"])", "\\\\$1"));
4443
}
4544

4645
@Override

http-client/src/main/java/com/proofpoint/http/client/ServiceTypeImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ public String value()
3939
@Override
4040
public String toString()
4141
{
42-
var isJava11 = System.getProperty("java.version").startsWith("11.");
43-
return String.format("@%s(%s\"%s\")", ServiceType.class.getName(), isJava11 ? "value=" : "", value.replaceAll("([\\\\\"])", "\\\\$1"));
42+
return String.format("@%s(%s\"%s\")", ServiceType.class.getName(), "", value.replaceAll("([\\\\\"])", "\\\\$1"));
4443
}
4544

4645
@Override

http-client/src/main/java/com/proofpoint/http/client/jetty/JettyHttpClient.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ public class JettyHttpClient
7676
{
7777

7878
private static final Logger log = Logger.get(JettyHttpClient.class);
79-
private static final String[] ENABLED_PROTOCOLS = System.getProperty("java.version").matches("11(\\.0\\.[12])?") ?
80-
new String[] {"TLSv1.2"} : new String[] {"TLSv1.2", "TLSv1.3"};
79+
private static final String[] ENABLED_PROTOCOLS = {"TLSv1.2", "TLSv1.3"};
8180
private static final String[] ENABLED_CIPHERS = {
8281
"TLS_AES_128_GCM_SHA256",
8382
"TLS_AES_256_GCM_SHA384",

http-server/src/main/java/com/proofpoint/http/server/HttpServer.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@
9393

9494
public class HttpServer
9595
{
96-
private static final String[] ENABLED_PROTOCOLS = System.getProperty("java.version").matches("11(\\.0\\.[12])?") ?
97-
new String[] {"TLSv1.2"} : new String[] {"TLSv1.2", "TLSv1.3"};
96+
private static final String[] ENABLED_PROTOCOLS = {"TLSv1.2", "TLSv1.3"};
9897
private static final String[] ENABLED_CIPHERS = {
9998
"TLS_AES_128_GCM_SHA256",
10099
"TLS_AES_256_GCM_SHA384",
@@ -270,8 +269,6 @@ protected void runJob(Runnable job)
270269
private ServerConnector createHttpsServerConnector(HttpServerConfig config, ServerSocketChannel serverSocketChannel, HttpConfiguration configuration, Executor threadPool, int acceptors, int selectors)
271270
throws IOException
272271
{
273-
checkState(!System.getProperty("java.version").startsWith("1.8."), "Java 8 is no longer supported");
274-
275272
SecureRequestCustomizer customizer = new SecureRequestCustomizer();
276273
customizer.setSniHostCheck(false);
277274
customizer.setSniRequired(false);

jmx/src/main/java/com/proofpoint/jmx/JavaVersion.java

Lines changed: 0 additions & 136 deletions
This file was deleted.

jmx/src/test/java/com/proofpoint/jmx/TestJavaVersion.java

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)