Skip to content

Commit d8b5c3e

Browse files
committed
Removed implementation of IOApp
1 parent 7269c24 commit d8b5c3e

File tree

4 files changed

+4
-18
lines changed

4 files changed

+4
-18
lines changed

client/src/main/java/nl/altindag/client/service/Http4sBlazeClientService.scala

+2-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
package nl.altindag.client.service
1717

18-
import cats.effect.{ExitCode, IO, IOApp, Resource}
18+
import cats.effect.{IO, Resource}
1919
import nl.altindag.client.ClientType
2020
import nl.altindag.client.ClientType.HTTP4S_BLAZE_CLIENT
2121
import nl.altindag.ssl.SSLFactory
@@ -33,7 +33,7 @@ class Http4sBlazeClientService(@Qualifier("blazeClient") client: Resource[IO, Cl
3333
}
3434

3535
@Component
36-
class BlazeClientConfiguration extends IOApp {
36+
class BlazeClientConfiguration {
3737

3838
@Bean(name = Array("blazeClient"))
3939
def createBlazeClient(sslFactory: SSLFactory): Resource[IO, Client[IO]] = {
@@ -42,6 +42,4 @@ class BlazeClientConfiguration extends IOApp {
4242
.resource
4343
}
4444

45-
override def run(args: List[String]): IO[ExitCode] = null
46-
4745
}

client/src/main/java/nl/altindag/client/service/Http4sJavaNetClientService.scala

+2-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
package nl.altindag.client.service
1717

18-
import cats.effect.{ExitCode, IO, IOApp, Resource}
18+
import cats.effect.{IO, Resource}
1919
import nl.altindag.client.ClientType
2020
import nl.altindag.client.ClientType.HTTP4S_JAVA_NET_CLIENT
2121
import nl.altindag.ssl.SSLFactory
@@ -32,7 +32,7 @@ class Http4sJavaNetClientService(@Qualifier("javaNetClient") client: Resource[IO
3232
}
3333

3434
@Component
35-
class JavaNetClientConfiguration extends IOApp {
35+
class JavaNetClientConfiguration {
3636

3737
@Bean(name = Array("javaNetClient"))
3838
def createJavaNetClient(sslFactory: SSLFactory): Resource[IO, Client[IO]] = {
@@ -42,6 +42,4 @@ class JavaNetClientConfiguration extends IOApp {
4242
.resource
4343
}
4444

45-
override def run(args: List[String]): IO[ExitCode] = null
46-
4745
}

client/src/test/java/nl/altindag/client/service/Http4sBlazeClientServiceShould.scala

-5
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,4 @@ class Http4sBlazeClientServiceShould extends AnyFunSpec with MockitoSugar {
3838
verify(sslFactory, times(1)).getSslContext
3939
}
4040

41-
describe("blaze io app run function should do nothing") {
42-
val any = new BlazeClientConfiguration().run(null)
43-
assertThat(any).isNull()
44-
}
45-
4641
}

client/src/test/java/nl/altindag/client/service/Http4sJavaNetClientServiceShould.scala

-5
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,4 @@ class Http4sJavaNetClientServiceShould extends AnyFunSpec with MockitoSugar {
4040
verify(sslFactory, times(1)).getHostnameVerifier
4141
}
4242

43-
describe("java net io app run function should do nothing") {
44-
val any = new JavaNetClientConfiguration().run(null)
45-
assertThat(any).isNull()
46-
}
47-
4843
}

0 commit comments

Comments
 (0)