Skip to content

Commit 13c017d

Browse files
retrikujbwheatley
authored andcommitted
Remove default values
1 parent 6405826 commit 13c017d

File tree

1 file changed

+4
-30
lines changed

1 file changed

+4
-30
lines changed

core/src/main/scala/dev/profunktor/fs2rabbit/algebra/Connection.scala

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -45,41 +45,15 @@ import scala.jdk.CollectionConverters._
4545
object ConnectionResource {
4646
type ConnectionResource[F[_]] = Connection[Resource[F, *]]
4747

48-
@deprecated("use other make method with configurable execution context", "4.1.1")
49-
private[algebra] def make[F[_]: Sync: Log](
50-
conf: Fs2RabbitConfig,
51-
sslCtx: Option[SSLContext],
52-
saslConf: SaslConfig,
53-
metricsCollector: Option[MetricsCollector],
54-
threadFactory: Option[F[ThreadFactory]]
55-
): F[Connection[Resource[F, *]]] = {
56-
val addThreadFactory: F[ConnectionFactory => Unit] =
57-
threadFactory.fold(Sync[F].pure((_: ConnectionFactory) => ())) { threadFact =>
58-
threadFact.map { tf => (cf: ConnectionFactory) =>
59-
cf.setThreadFactory(tf)
60-
}
61-
}
62-
addThreadFactory.flatMap { fn =>
63-
_make(
64-
conf,
65-
None,
66-
sslCtx,
67-
saslConf,
68-
metricsCollector,
69-
fn
70-
)
71-
}
72-
}
73-
7448
def make[F[_]: Sync: Log](
7549
conf: Fs2RabbitConfig,
7650
executionContext: ExecutionContext,
77-
sslCtx: Option[SSLContext] = None,
51+
sslCtx: Option[SSLContext],
7852
// Unlike SSLContext, SaslConfig is not optional because it is always set
7953
// by the underlying Java library, even if the user doesn't set it.
80-
saslConf: SaslConfig = DefaultSaslConfig.PLAIN,
81-
metricsCollector: Option[MetricsCollector] = None,
82-
threadFactory: Option[F[ThreadFactory]] = None
54+
saslConf: SaslConfig,
55+
metricsCollector: Option[MetricsCollector],
56+
threadFactory: Option[F[ThreadFactory]]
8357
): F[Connection[Resource[F, *]]] = {
8458
val addThreadFactory: F[ConnectionFactory => Unit] =
8559
threadFactory.fold(Sync[F].pure((_: ConnectionFactory) => ())) { threadFact =>

0 commit comments

Comments
 (0)