diff --git a/client/src/main/java/org/glassfish/tyrus/client/ClientManager.java b/client/src/main/java/org/glassfish/tyrus/client/ClientManager.java index 151aa248..bf9dd548 100755 --- a/client/src/main/java/org/glassfish/tyrus/client/ClientManager.java +++ b/client/src/main/java/org/glassfish/tyrus/client/ClientManager.java @@ -297,45 +297,25 @@ public Session connectToServer(final Class annotatedEndpointClass, final URI pat "Class argument in connectToServer(Class, URI) is to be annotated endpoint class. Class " + "%s does not have @ClientEndpoint", annotatedEndpointClass.getName())); } - return tryCatchInterruptedExecutionEx(new SupplierWithEx, DeploymentException>() { - @Override - public Future get() throws DeploymentException { - return connectToServer(annotatedEndpointClass, null, path.toString(), true); - } - }); + return tryCatchInterruptedExecutionEx(() -> connectToServer(annotatedEndpointClass, null, path.toString(), true)); } @Override public Session connectToServer(final Class endpointClass, final ClientEndpointConfig cec, final URI path) throws DeploymentException, IOException { - return tryCatchInterruptedExecutionEx(new SupplierWithEx, DeploymentException>() { - @Override - public Future get() throws DeploymentException { - return connectToServer(endpointClass, cec, path.toString(), true); - } - }); + return tryCatchInterruptedExecutionEx(() -> connectToServer(endpointClass, cec, path.toString(), true)); } @Override public Session connectToServer(final Endpoint endpointInstance, final ClientEndpointConfig cec, final URI path) throws DeploymentException, IOException { - return tryCatchInterruptedExecutionEx(new SupplierWithEx, DeploymentException>() { - @Override - public Future get() throws DeploymentException { - return connectToServer(endpointInstance, cec, path.toString(), true); - } - }); + return tryCatchInterruptedExecutionEx(() -> connectToServer(endpointInstance, cec, path.toString(), true)); } @Override public Session connectToServer(final Object obj, final URI path) throws DeploymentException, IOException { - return tryCatchInterruptedExecutionEx(new SupplierWithEx, DeploymentException>() { - @Override - public Future get() throws DeploymentException { - return connectToServer(obj, null, path.toString(), true); - } - }); + return tryCatchInterruptedExecutionEx(() -> connectToServer(obj, null, path.toString(), true)); } private Session tryCatchInterruptedExecutionEx(SupplierWithEx, DeploymentException> supplier) diff --git a/core/src/main/java/org/glassfish/tyrus/core/AnnotatedEndpoint.java b/core/src/main/java/org/glassfish/tyrus/core/AnnotatedEndpoint.java index eee3975e..b3334d8a 100755 --- a/core/src/main/java/org/glassfish/tyrus/core/AnnotatedEndpoint.java +++ b/core/src/main/java/org/glassfish/tyrus/core/AnnotatedEndpoint.java @@ -95,7 +95,7 @@ public static AnnotatedEndpoint fromClass(Class annotatedClass, ComponentProv boolean isServerEndpoint, int incomingBufferSize, ErrorCollector collector, EndpointEventListener endpointEventListener) { return fromClass(annotatedClass, componentProvider, isServerEndpoint, incomingBufferSize, collector, - endpointEventListener, (Set) (Set) Collections.emptySet()); + endpointEventListener, Collections.emptySet()); } /** @@ -132,7 +132,7 @@ public static AnnotatedEndpoint fromInstance( Object annotatedInstance, ComponentProviderService componentProvider, boolean isServerEndpoint, int incomingBufferSize, ErrorCollector collector) { return fromInstance(annotatedInstance, componentProvider, isServerEndpoint, incomingBufferSize, - collector, (Set) (Set) Collections.emptySet()); + collector, Collections.emptySet()); } /** diff --git a/core/src/main/java/org/glassfish/tyrus/core/TyrusServerEndpointConfigurator.java b/core/src/main/java/org/glassfish/tyrus/core/TyrusServerEndpointConfigurator.java index dc30b8d5..3b7fb8f9 100644 --- a/core/src/main/java/org/glassfish/tyrus/core/TyrusServerEndpointConfigurator.java +++ b/core/src/main/java/org/glassfish/tyrus/core/TyrusServerEndpointConfigurator.java @@ -17,8 +17,6 @@ package org.glassfish.tyrus.core; import java.lang.reflect.Method; -import java.security.AccessController; -import java.security.PrivilegedAction; import java.util.ArrayList; import java.util.List; @@ -28,7 +26,6 @@ import jakarta.websocket.server.ServerEndpointConfig; import org.glassfish.tyrus.core.collection.LazyValue; -import org.glassfish.tyrus.core.collection.Value; import org.glassfish.tyrus.core.collection.Values; import org.glassfish.tyrus.core.extension.ExtendedExtension; import org.glassfish.tyrus.core.frame.Frame; @@ -43,12 +40,7 @@ public class TyrusServerEndpointConfigurator extends ServerEndpointConfig.Config private LazyValue componentProviderService; public TyrusServerEndpointConfigurator() { - this.componentProviderService = Values.lazy(new Value() { - @Override - public ComponentProviderService get() { - return ComponentProviderService.create(); - } - }); + this.componentProviderService = Values.lazy(() -> ComponentProviderService.create()); } @Override diff --git a/ext/client-java8/pom.xml b/ext/client-java8/pom.xml index a188e4e3..4aab416b 100644 --- a/ext/client-java8/pom.xml +++ b/ext/client-java8/pom.xml @@ -77,13 +77,6 @@ true - - maven-compiler-plugin - - 1.8 - 1.8 - - diff --git a/tests/release-test/pom.xml b/tests/release-test/pom.xml index d7f1a023..9fa55b5e 100644 --- a/tests/release-test/pom.xml +++ b/tests/release-test/pom.xml @@ -57,13 +57,6 @@ - - maven-compiler-plugin - - 1.8 - 1.8 - - diff --git a/tests/tools/pom.xml b/tests/tools/pom.xml index 72d9e037..bc45bdaf 100755 --- a/tests/tools/pom.xml +++ b/tests/tools/pom.xml @@ -43,13 +43,6 @@ true - - maven-compiler-plugin - - 1.8 - 1.8 - -