Skip to content

Commit

Permalink
Revert the JDK7-related changes for EE9+ branch
Browse files Browse the repository at this point in the history
Signed-off-by: jansupol <[email protected]>
  • Loading branch information
jansupol committed Dec 21, 2023
1 parent baddff9 commit 0ad61a8
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 56 deletions.
28 changes: 4 additions & 24 deletions client/src/main/java/org/glassfish/tyrus/client/ClientManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<Future<Session>, DeploymentException>() {
@Override
public Future<Session> get() throws DeploymentException {
return connectToServer(annotatedEndpointClass, null, path.toString(), true);
}
});
return tryCatchInterruptedExecutionEx(() -> connectToServer(annotatedEndpointClass, null, path.toString(), true));
}

@Override
public Session connectToServer(final Class<? extends Endpoint> endpointClass,
final ClientEndpointConfig cec,
final URI path) throws DeploymentException, IOException {
return tryCatchInterruptedExecutionEx(new SupplierWithEx<Future<Session>, DeploymentException>() {
@Override
public Future<Session> 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<Future<Session>, DeploymentException>() {
@Override
public Future<Session> 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<Future<Session>, DeploymentException>() {
@Override
public Future<Session> get() throws DeploymentException {
return connectToServer(obj, null, path.toString(), true);
}
});
return tryCatchInterruptedExecutionEx(() -> connectToServer(obj, null, path.toString(), true));
}

private Session tryCatchInterruptedExecutionEx(SupplierWithEx<Future<Session>, DeploymentException> supplier)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Extension>) (Set) Collections.emptySet());
endpointEventListener, Collections.emptySet());
}

/**
Expand Down Expand Up @@ -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<Extension>) (Set) Collections.emptySet());
collector, Collections.emptySet());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand All @@ -43,12 +40,7 @@ public class TyrusServerEndpointConfigurator extends ServerEndpointConfig.Config
private LazyValue<ComponentProviderService> componentProviderService;

public TyrusServerEndpointConfigurator() {
this.componentProviderService = Values.lazy(new Value<ComponentProviderService>() {
@Override
public ComponentProviderService get() {
return ComponentProviderService.create();
}
});
this.componentProviderService = Values.lazy(() -> ComponentProviderService.create());
}

@Override
Expand Down
7 changes: 0 additions & 7 deletions ext/client-java8/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,6 @@
<unpackBundle>true</unpackBundle>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
7 changes: 0 additions & 7 deletions tests/release-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,6 @@
</includes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
7 changes: 0 additions & 7 deletions tests/tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@
<unpackBundle>true</unpackBundle>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit 0ad61a8

Please sign in to comment.