diff --git a/ethers-providers/src/main/kotlin/io/ethers/providers/AsyncExecutor.kt b/ethers-providers/src/main/kotlin/io/ethers/providers/AsyncExecutor.kt index 646a0cb..caa9f95 100644 --- a/ethers-providers/src/main/kotlin/io/ethers/providers/AsyncExecutor.kt +++ b/ethers-providers/src/main/kotlin/io/ethers/providers/AsyncExecutor.kt @@ -25,7 +25,7 @@ internal object AsyncExecutor { val factory = MethodHandles.lookup().findVirtual( threadBuilderClass, "factory", - MethodType.methodType(ThreadFactory::class.java) // The method returns a ThreadFactory + MethodType.methodType(ThreadFactory::class.java), // The method returns a ThreadFactory ).bindTo(Thread::class.java.getMethod("ofVirtual").invoke(null)) // invoke while catching to see if we need to set "--enable-preview" flag @@ -41,7 +41,7 @@ internal object AsyncExecutor { lookup.findStatic( Executors::class.java, "newVirtualThreadPerTaskExecutor", - MethodType.methodType(ExecutorService::class.java) + MethodType.methodType(ExecutorService::class.java), ) }.getOrNull()?.invokeExact() as? ExecutorService diff --git a/ethers-providers/src/main/kotlin/io/ethers/providers/WsClient.kt b/ethers-providers/src/main/kotlin/io/ethers/providers/WsClient.kt index aa88a01..098d651 100644 --- a/ethers-providers/src/main/kotlin/io/ethers/providers/WsClient.kt +++ b/ethers-providers/src/main/kotlin/io/ethers/providers/WsClient.kt @@ -31,7 +31,6 @@ import org.jctools.queues.SpscUnboundedArrayQueue import java.io.IOException import java.util.concurrent.CompletableFuture import java.util.concurrent.ConcurrentHashMap -import java.util.concurrent.ThreadFactory import java.util.concurrent.TimeUnit import java.util.concurrent.locks.ReentrantLock import java.util.function.Function diff --git a/ethers-providers/src/main/kotlin/io/ethers/providers/types/RpcRequest.kt b/ethers-providers/src/main/kotlin/io/ethers/providers/types/RpcRequest.kt index 72c20b7..db8aeac 100644 --- a/ethers-providers/src/main/kotlin/io/ethers/providers/types/RpcRequest.kt +++ b/ethers-providers/src/main/kotlin/io/ethers/providers/types/RpcRequest.kt @@ -133,8 +133,7 @@ private class MappingRpcRequest( ) : RpcRequest() { override fun sendAwait(): Result = sendAsync().join() - override fun sendAsync(): CompletableFuture> = - request.sendAsync().thenApplyAsync(mapper, asyncExecutor()) + override fun sendAsync(): CompletableFuture> = request.sendAsync().thenApplyAsync(mapper, asyncExecutor()) override fun batch(batch: BatchRpcRequest): CompletableFuture> { return request.batch(batch).thenApplyAsync(mapper, asyncExecutor()) @@ -153,8 +152,7 @@ class SuppliedRpcRequest( ) : RpcRequest() { override fun sendAwait(): Result = supplier.get() - override fun sendAsync(): CompletableFuture> = - CompletableFuture.supplyAsync(supplier, asyncExecutor()) + override fun sendAsync(): CompletableFuture> = CompletableFuture.supplyAsync(supplier, asyncExecutor()) override fun batch(batch: BatchRpcRequest): CompletableFuture> { return CompletableFuture.supplyAsync(supplier, asyncExecutor()) @@ -164,4 +162,3 @@ class SuppliedRpcRequest( return "SuppliedRpcRequest(supplier=$supplier)" } } -