Skip to content

Commit

Permalink
Address Ian's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
spenes committed Dec 14, 2023
1 parent 7cc0c5b commit 039d62b
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,18 @@ class AzureAuthenticationCallbackHandler extends AuthenticateCallbackHandler {
saslMechanism: String,
jaasConfigEntries: util.List[AppConfigurationEntry]
): Unit = {
val bootstrapServer = configs.get(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG).toString.replaceAll("\\[|\\]", "")
val uri = URI.create("https://" + bootstrapServer)
val bootstrapServer =
configs
.get(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG)
.toString
.replaceAll("\\[|\\]", "")
.split(",")
.toList
.headOption match {
case Some(s) => s
case None => throw new Exception("Empty bootstrap servers list")
}
val uri = URI.create("https://" + bootstrapServer)
this.sbUri = uri.getScheme + "://" + uri.getHost
}

Expand Down

0 comments on commit 039d62b

Please sign in to comment.