From d8b5c3eb00d8a1fb161ebea650752cfd12c1c95f Mon Sep 17 00:00:00 2001 From: Hakky54 Date: Thu, 19 Dec 2024 09:50:42 +0100 Subject: [PATCH] Removed implementation of IOApp --- .../altindag/client/service/Http4sBlazeClientService.scala | 6 ++---- .../client/service/Http4sJavaNetClientService.scala | 6 ++---- .../client/service/Http4sBlazeClientServiceShould.scala | 5 ----- .../client/service/Http4sJavaNetClientServiceShould.scala | 5 ----- 4 files changed, 4 insertions(+), 18 deletions(-) diff --git a/client/src/main/java/nl/altindag/client/service/Http4sBlazeClientService.scala b/client/src/main/java/nl/altindag/client/service/Http4sBlazeClientService.scala index 29429c3..1d617ed 100644 --- a/client/src/main/java/nl/altindag/client/service/Http4sBlazeClientService.scala +++ b/client/src/main/java/nl/altindag/client/service/Http4sBlazeClientService.scala @@ -15,7 +15,7 @@ */ package nl.altindag.client.service -import cats.effect.{ExitCode, IO, IOApp, Resource} +import cats.effect.{IO, Resource} import nl.altindag.client.ClientType import nl.altindag.client.ClientType.HTTP4S_BLAZE_CLIENT import nl.altindag.ssl.SSLFactory @@ -33,7 +33,7 @@ class Http4sBlazeClientService(@Qualifier("blazeClient") client: Resource[IO, Cl } @Component -class BlazeClientConfiguration extends IOApp { +class BlazeClientConfiguration { @Bean(name = Array("blazeClient")) def createBlazeClient(sslFactory: SSLFactory): Resource[IO, Client[IO]] = { @@ -42,6 +42,4 @@ class BlazeClientConfiguration extends IOApp { .resource } - override def run(args: List[String]): IO[ExitCode] = null - } diff --git a/client/src/main/java/nl/altindag/client/service/Http4sJavaNetClientService.scala b/client/src/main/java/nl/altindag/client/service/Http4sJavaNetClientService.scala index 31e3e50..8fca226 100644 --- a/client/src/main/java/nl/altindag/client/service/Http4sJavaNetClientService.scala +++ b/client/src/main/java/nl/altindag/client/service/Http4sJavaNetClientService.scala @@ -15,7 +15,7 @@ */ package nl.altindag.client.service -import cats.effect.{ExitCode, IO, IOApp, Resource} +import cats.effect.{IO, Resource} import nl.altindag.client.ClientType import nl.altindag.client.ClientType.HTTP4S_JAVA_NET_CLIENT import nl.altindag.ssl.SSLFactory @@ -32,7 +32,7 @@ class Http4sJavaNetClientService(@Qualifier("javaNetClient") client: Resource[IO } @Component -class JavaNetClientConfiguration extends IOApp { +class JavaNetClientConfiguration { @Bean(name = Array("javaNetClient")) def createJavaNetClient(sslFactory: SSLFactory): Resource[IO, Client[IO]] = { @@ -42,6 +42,4 @@ class JavaNetClientConfiguration extends IOApp { .resource } - override def run(args: List[String]): IO[ExitCode] = null - } diff --git a/client/src/test/java/nl/altindag/client/service/Http4sBlazeClientServiceShould.scala b/client/src/test/java/nl/altindag/client/service/Http4sBlazeClientServiceShould.scala index d6aaf37..8cefdb3 100644 --- a/client/src/test/java/nl/altindag/client/service/Http4sBlazeClientServiceShould.scala +++ b/client/src/test/java/nl/altindag/client/service/Http4sBlazeClientServiceShould.scala @@ -38,9 +38,4 @@ class Http4sBlazeClientServiceShould extends AnyFunSpec with MockitoSugar { verify(sslFactory, times(1)).getSslContext } - describe("blaze io app run function should do nothing") { - val any = new BlazeClientConfiguration().run(null) - assertThat(any).isNull() - } - } diff --git a/client/src/test/java/nl/altindag/client/service/Http4sJavaNetClientServiceShould.scala b/client/src/test/java/nl/altindag/client/service/Http4sJavaNetClientServiceShould.scala index d1713b1..3984c81 100644 --- a/client/src/test/java/nl/altindag/client/service/Http4sJavaNetClientServiceShould.scala +++ b/client/src/test/java/nl/altindag/client/service/Http4sJavaNetClientServiceShould.scala @@ -40,9 +40,4 @@ class Http4sJavaNetClientServiceShould extends AnyFunSpec with MockitoSugar { verify(sslFactory, times(1)).getHostnameVerifier } - describe("java net io app run function should do nothing") { - val any = new JavaNetClientConfiguration().run(null) - assertThat(any).isNull() - } - }