Skip to content

Commit 918d92d

Browse files
committed
Sanitize with -Xsource:3 continued
1 parent bd54eb1 commit 918d92d

File tree

98 files changed

+360
-377
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+360
-377
lines changed

src/main/java/actor/DemoMessagesActor.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,8 @@ public static void main(String[] args) {
2525
.addTask(
2626
CoordinatedShutdown.PhaseBeforeServiceUnbind(),
2727
"stop",
28-
() -> {
29-
return akka.pattern.Patterns.ask(demoActor, new Stop(), Duration.ofSeconds(5))
30-
.thenApply(reply -> Done.getInstance());
31-
});
28+
() -> Patterns.ask(demoActor, new Stop(), Duration.ofSeconds(5))
29+
.thenApply(reply -> Done.getInstance()));
3230

3331
//Tell: Fire and forget
3432
demoActor.tell(new GreetingTell("Hi tell"), ActorRef.noSender());
@@ -70,7 +68,7 @@ public Stop() {
7068
/**
7169
* Create Props for an actor of this type.
7270
*
73-
* @param initValue The inital value for the counterTell is passed to this actor’s constructor.
71+
* @param initValue The initial value for the counterTell is passed to this actor’s constructor.
7472
* @return a Props for creating this actor, which can then be further configured
7573
* (e.g. calling `.withDispatcher()` on it)
7674
*/

src/main/java/actor/HelloWorldMain.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public static void main(String[] args) throws Exception {
2020

2121
system.tell(new HelloWorldMain.Start("World"));
2222
system.tell(new HelloWorldMain.Start("Akka"));
23-
//TODO Add ask messages
2423

2524
Thread.sleep(3000);
2625
system.terminate();

src/main/java/util/ConnectionStatusChecker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ private boolean testHttp(String endpointURL, SSLContext sslContext) {
121121
try {
122122
HttpClient httpClient = HttpClients.custom().setSSLContext(sslContext).build();
123123
httpClient.execute(new HttpOptions(endpointURL));
124-
LOGGER.info("...successfully connected via HTTP OPTONS request to: {}", endpointURL);
124+
LOGGER.info("...successfully connected via HTTP OPTIONS request to: {}", endpointURL);
125125
return true;
126126
} catch (Exception e) {
127127
LOGGER.warn("...unable to connect to: {}. Reason: ", endpointURL, e);

src/main/scala/akkahttp/HttpFileEcho.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ object HttpFileEcho extends App with JsonProtocol {
142142
}
143143
}
144144

145-
def roundtripClient(id: Int, address: String, port: Int) = {
145+
def roundtripClient(id: Int, address: String, port: Int): Unit = {
146146
val fileHandle = uploadClient(id, address, port)
147147
fileHandle.onComplete {
148148
case Success(each) => downloadClient(id, each, address, port)
@@ -188,7 +188,7 @@ object HttpFileEcho extends App with JsonProtocol {
188188

189189
def upload(file: File): Future[FileHandle] = {
190190

191-
def delayRequestSoTheServerIsNotHammered() = {
191+
def delayRequestSoTheServerIsNotHammered(): Unit = {
192192
val (start, end) = (1000, 5000)
193193
val rnd = new scala.util.Random
194194
val sleepTime = start + rnd.nextInt((end - start) + 1)
@@ -239,7 +239,7 @@ object HttpFileEcho extends App with JsonProtocol {
239239
.runWith(FileIO.toPath(Paths.get(localFile.getAbsolutePath)))
240240
}
241241

242-
def download(remoteFileHandle: FileHandle, localFile: File) = {
242+
def download(remoteFileHandle: FileHandle, localFile: File): Unit = {
243243

244244
val result = for {
245245
reqEntity <- Marshal(remoteFileHandle).to[RequestEntity]

src/main/scala/akkahttp/ReverseProxy.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import org.slf4j.{Logger, LoggerFactory}
1919
import java.util.concurrent.ConcurrentHashMap
2020
import java.util.concurrent.atomic.AtomicInteger
2121
import scala.collection.parallel.CollectionConverters.ImmutableIterableIsParallelizable
22-
import scala.concurrent.duration.DurationInt
2322
import scala.concurrent.*
23+
import scala.concurrent.duration.DurationInt
2424
import scala.util.{Failure, Success}
2525

2626
/**
@@ -94,7 +94,7 @@ object ReverseProxy extends App {
9494
clients.par.foreach(clientID => httpClient(clientID, proxyHost, proxyPort, mode, requestsPerClient))
9595

9696
def httpClient(clientId: Int, proxyHost: String, proxyPort: Int, targetHost: Mode, nbrOfRequests: Int) = {
97-
def logResponse(response: HttpResponse) = {
97+
def logResponse(response: HttpResponse): Unit = {
9898
val id = response.getHeader("X-Correlation-ID").orElse(RawHeader("X-Correlation-ID", "N/A")).value()
9999
val msg = response.entity.dataBytes.runReduce(_ ++ _).map(data => data.utf8String)
100100
msg.onComplete(msg => logger.info(s"Client: $clientId got response: ${response.status.intValue()} for id: $id and msg: ${msg.getOrElse("N/A")}"))

src/main/scala/akkahttp/WebsocketChatEcho.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ object WebsocketChatEcho extends App with ClientCommon {
100100
.map(addr => logger.info(s"Server bound to: $addr"))
101101
}
102102

103-
private def clientWebSocketClientFlow(clientName: String, address: String, port: Int) = {
103+
private def clientWebSocketClientFlow(clientName: String, address: String, port: Int): Unit = {
104104

105105
val webSocketNonReusableFlow: Flow[Message, Message, Future[WebSocketUpgradeResponse]] = Http().webSocketClientFlow(WebSocketRequest(s"ws://$address:$port/echochat"))
106106

src/main/scala/akkahttp/WebsocketEcho.scala

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ trait ClientCommon {
3535
//see https://github.com/akka/akka-http/issues/65
3636
case TextMessage.Strict(text) => logger.info(s"Client received TextMessage.Strict: $text")
3737
case TextMessage.Streamed(textStream) => textStream.runFold("")(_ + _).onComplete(value => logger.info(s"Client received TextMessage.Streamed: ${value.get}"))
38-
case BinaryMessage.Strict(binary) => //do nothing
38+
case BinaryMessage.Strict(_) => // binary, do nothing
3939
case BinaryMessage.Streamed(binaryStream) => binaryStream.runWith(Sink.ignore)
4040
}
4141

4242
// see https://doc.akka.io/docs/akka-http/current/client-side/websocket-support.html?language=scala#half-closed-websockets
43-
def namedSource(clientname: String) = {
43+
def namedSource(clientname: String): Source[Message, Promise[Option[Message]]] = {
4444
Source
4545
.tick(1.second, 1.second, "tick")
4646
.zipWithIndex
@@ -50,7 +50,7 @@ trait ClientCommon {
5050
.concatMat(Source.maybe[Message])(Keep.right)
5151
}
5252

53-
def browserClient() = {
53+
def browserClient(): AnyVal = {
5454
val os = System.getProperty("os.name").toLowerCase
5555
if (os == "mac os x") Process("open src/main/resources/WebsocketEcho.html").!
5656
else if (os == "windows 10") Seq("cmd", "/c", "start src/main/resources/WebsocketEcho.html").!
@@ -175,7 +175,7 @@ object WebsocketEcho extends App with WebSocketDirectives with ClientCommon {
175175
}
176176
}
177177

178-
def singleWebSocketRequestClient(id: Int, address: String, port: Int) = {
178+
def singleWebSocketRequestClient(id: Int, address: String, port: Int): Unit = {
179179

180180
val webSocketNonReusableFlow: Flow[Message, Message, Promise[Option[Message]]] =
181181
Flow.fromSinkAndSourceMat(
@@ -191,7 +191,7 @@ object WebsocketEcho extends App with WebSocketDirectives with ClientCommon {
191191
completionPromise.future.onComplete(closed => logger.info(s"Client: $id singleWebSocketRequestClient closed: $closed"))
192192
}
193193

194-
def webSocketClientFlowClient(id: Int, address: String, port: Int) = {
194+
def webSocketClientFlowClient(id: Int, address: String, port: Int): Unit = {
195195

196196
val webSocketNonReusableFlow: Flow[Message, Message, Future[WebSocketUpgradeResponse]] = Http().webSocketClientFlow(WebSocketRequest(s"ws://$address:$port/echo"))
197197

@@ -207,7 +207,7 @@ object WebsocketEcho extends App with WebSocketDirectives with ClientCommon {
207207
closed.onComplete(closed => logger.info(s"Client: $id webSocketClientFlowClient closed: $closed"))
208208
}
209209

210-
def singleWebSocketRequestSourceQueueClient(id: Int, address: String, port: Int) = {
210+
def singleWebSocketRequestSourceQueueClient(id: Int, address: String, port: Int): Unit = {
211211

212212
val (source, sourceQueue) = {
213213
val p = Promise[SourceQueue[Message]]()
@@ -248,7 +248,7 @@ object WebsocketEcho extends App with WebSocketDirectives with ClientCommon {
248248
sourceQueueWithComplete.complete()
249249
}
250250

251-
def actorClient(id: Int, address: String, port: Int) = {
251+
def actorClient(id: Int, address: String, port: Int): Unit = {
252252

253253
val sourceBackpressure = Source.actorRefWithBackpressure[TextMessage](
254254
ackMessage = "ack",

src/main/scala/akkahttp/WebsocketEchoActors.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ object WebsocketEchoActors extends App with ClientCommon {
6262
case class CloseConnection(uuid: UUID)
6363
}
6464

65-
def server(address: String, port: Int) = {
65+
def server(address: String, port: Int): Unit = {
6666

6767
val chatRef = system.actorOf(Props[ChatRef]())
6868

src/main/scala/akkahttp/oidc/CORSHandler.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package akkahttp.oidc
22

3-
import org.apache.pekko.http.scaladsl.model.HttpMethods._
4-
import org.apache.pekko.http.scaladsl.model.headers._
3+
import org.apache.pekko.http.scaladsl.model.HttpMethods.*
4+
import org.apache.pekko.http.scaladsl.model.headers.*
55
import org.apache.pekko.http.scaladsl.model.{HttpResponse, StatusCodes}
6-
import org.apache.pekko.http.scaladsl.server.Directives.{complete, options, respondWithHeaders, _}
6+
import org.apache.pekko.http.scaladsl.server.Directives.{complete, options, respondWithHeaders, *}
77
import org.apache.pekko.http.scaladsl.server.{Directive0, Route}
88

99
trait CORSHandler {

src/main/scala/akkahttp/oidc/OIDCKeycloak.scala

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ import io.circe.parser.decode
55
import io.circe.syntax.*
66
import org.apache.pekko.actor.ActorSystem
77
import org.apache.pekko.http.scaladsl.Http
8-
import org.apache.pekko.http.scaladsl.model.headers.{HttpChallenge, OAuth2BearerToken}
98
import org.apache.pekko.http.scaladsl.model.*
9+
import org.apache.pekko.http.scaladsl.model.headers.{HttpChallenge, OAuth2BearerToken}
1010
import org.apache.pekko.http.scaladsl.server.Directives.*
11-
import org.apache.pekko.http.scaladsl.server.{AuthenticationFailedRejection, Directive1, RejectionHandler, Route}
11+
import org.apache.pekko.http.scaladsl.server.{AuthenticationFailedRejection, Directive1, Route}
1212
import org.apache.pekko.http.scaladsl.unmarshalling.Unmarshal
13-
import org.apache.pekko.util.Timeout
1413
import org.keycloak.TokenVerifier
1514
import org.keycloak.adapters.KeycloakDeploymentBuilder
1615
import org.keycloak.admin.client.{CreatedResponseUtil, Keycloak, KeycloakBuilder}
@@ -27,7 +26,6 @@ import java.security.{KeyFactory, PublicKey}
2726
import java.time.Duration
2827
import java.util
2928
import java.util.{Base64, Collections}
30-
import scala.concurrent.duration.DurationInt
3129
import scala.concurrent.{ExecutionContextExecutor, Future}
3230
import scala.jdk.CollectionConverters.CollectionHasAsScala
3331
import scala.sys.process.{Process, stringSeqToProcess}
@@ -77,17 +75,17 @@ object OIDCKeycloak extends App with CORSHandler with JsonSupport {
7775

7876
def initAdminClient() = {
7977
val keycloakAdminClient = KeycloakBuilder.builder()
80-
.serverUrl(keycloak.getAuthServerUrl())
78+
.serverUrl(keycloak.getAuthServerUrl)
8179
.realm("master")
8280
.clientId(adminClientId)
83-
.username(keycloak.getAdminUsername())
84-
.password(keycloak.getAdminPassword())
81+
.username(keycloak.getAdminUsername)
82+
.password(keycloak.getAdminPassword)
8583
.build()
86-
logger.info("Connected to Keycloak server version: " + keycloakAdminClient.serverInfo().getInfo().getSystemInfo().getVersion())
84+
logger.info("Connected to Keycloak server version: " + keycloakAdminClient.serverInfo().getInfo.getSystemInfo.getVersion)
8785
keycloakAdminClient
8886
}
8987

90-
def createTestUser(keycloakAdminClient: Keycloak) = {
88+
def createTestUser(keycloakAdminClient: Keycloak): Unit = {
9189
val username = "test"
9290
val password = "test"
9391
val usersResource = keycloakAdminClient.realm("test").users()
@@ -118,7 +116,7 @@ object OIDCKeycloak extends App with CORSHandler with JsonSupport {
118116
logger.info(s"User $username/$password may sign in via: http://localhost:${keycloak.getHttpPort}/realms/test/account")
119117
}
120118

121-
def createClientConfig(keycloakAdminClient: Keycloak) = {
119+
def createClientConfig(keycloakAdminClient: Keycloak): Unit = {
122120
val clientId = "my-test-client"
123121
val clientRepresentation = new ClientRepresentation()
124122
clientRepresentation.setClientId(clientId)
@@ -144,14 +142,7 @@ object OIDCKeycloak extends App with CORSHandler with JsonSupport {
144142
keycloakAdminClient
145143
}
146144

147-
def runBackendServer(keycloak: KeycloakContainer) = {
148-
149-
implicit def rejectionHandler = RejectionHandler.newBuilder().handle {
150-
case AuthenticationFailedRejection(reason, _) => complete(StatusCodes.Unauthorized, reason.toString)
151-
}.result().mapRejectionResponse(addCORSHeaders)
152-
153-
implicit val timeout: Timeout = Timeout(5.seconds)
154-
145+
def runBackendServer(keycloak: KeycloakContainer): Unit = {
155146
val config = new AdapterConfig()
156147
config.setAuthServerUrl(keycloak.getAuthServerUrl)
157148
config.setRealm("test")

src/main/scala/alpakka/amqp/AmqpEcho.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ object AmqpEcho extends App {
6464
* @param id
6565
* @param rabbitMQContainer
6666
*/
67-
def pubSubClient(id: Int, rabbitMQContainer: RabbitMQContainer) = {
67+
def pubSubClient(id: Int, rabbitMQContainer: RabbitMQContainer): Unit = {
6868
val connectionProvider =
6969
AmqpCachedConnectionProvider(
7070
AmqpDetailsConnectionProvider(
@@ -93,7 +93,7 @@ object AmqpEcho extends App {
9393
* @param id
9494
* @param rabbitMQContainer
9595
*/
96-
def rpcScenario(id: Int, rabbitMQContainer: RabbitMQContainer) = {
96+
def rpcScenario(id: Int, rabbitMQContainer: RabbitMQContainer): Unit = {
9797
val mappedPort = rabbitMQContainer.getAmqpPort
9898
val amqpUri = s"amqp://$host:$mappedPort"
9999
val connectionProvider = AmqpCachedConnectionProvider(AmqpUriConnectionProvider(amqpUri))
@@ -190,7 +190,7 @@ object AmqpEcho extends App {
190190
writeResult
191191
}
192192

193-
private def receiveFromQueueAck(id: Int, connectionProvider: AmqpCachedConnectionProvider, queueDeclaration: QueueDeclaration, noOfSentMsg: Int, queueNameFull: String) = {
193+
private def receiveFromQueueAck(id: Int, connectionProvider: AmqpCachedConnectionProvider, queueDeclaration: QueueDeclaration, noOfSentMsg: Int, queueNameFull: String): Unit = {
194194
logger.info(s"Starting receiveFromQueueAck: $queueNameFull...")
195195

196196
val amqpSource = AmqpSource.committableSource(
@@ -225,7 +225,7 @@ object AmqpEcho extends App {
225225
}
226226
}
227227

228-
private def sendToExchange(id: Int, connectionProvider: AmqpCachedConnectionProvider, exchangeName: String, exchangeDeclaration: ExchangeDeclaration) = {
228+
private def sendToExchange(id: Int, connectionProvider: AmqpCachedConnectionProvider, exchangeName: String, exchangeDeclaration: ExchangeDeclaration): Unit = {
229229
// Wait until the receiver has registered
230230
Thread.sleep(1000)
231231
logger.info(s"Starting sendToExchange: $exchangeName...")

src/main/scala/alpakka/clickhousedb/ClickhouseDB.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package alpakka.clickhousedb
33
import com.crobox.clickhouse.ClickhouseClient
44
import com.crobox.clickhouse.stream.{ClickhouseSink, Insert}
55
import com.typesafe.config.{Config, ConfigFactory, ConfigValueFactory}
6+
import org.apache.pekko.Done
67
import org.apache.pekko.actor.ActorSystem
78
import org.apache.pekko.stream.scaladsl.{Framing, Sink, Source}
89
import org.apache.pekko.util.ByteString
@@ -43,15 +44,15 @@ class ClickhouseDB(httpPort: Int) {
4344
result.trim
4445
}
4546

46-
def writeAll(noOfRecords: Integer) = {
47+
def writeAll(noOfRecords: Integer): Future[Done] = {
4748
Source(1 to noOfRecords)
4849
.map(id => Insert("test.my_table", s"{\"myfloat_nullable\": $id, \"mystr\": $id, \"myint_id\": $id}"))
4950
.wireTap((insert: Insert) => logger.debug(s"Insert record with type JSONEachRow: $insert"))
5051
.runWith(ClickhouseSink.toSink(tweakedConf, client))
5152
}
5253

5354
// The most intuitive way to read the streamed records
54-
def readAllSource() = {
55+
def readAllSource(): Future[Int] = {
5556
val resultFut = client.source("SELECT * FROM test.my_table ORDER BY myint_id ASC FORMAT JSONEachRow SETTINGS output_format_json_named_tuples_as_objects=1;")
5657
.wireTap((line: String) => logger.debug(s"Raw JSON record: $line"))
5758
.runWith(Sink.seq)
@@ -60,7 +61,7 @@ class ClickhouseDB(httpPort: Int) {
6061
}
6162

6263
// An alternative way to read, allows for more control, eg while massaging the result
63-
def readAllSourceByteString() = {
64+
def readAllSourceByteString(): Future[Int] = {
6465
val resultFut = client.sourceByteString("SELECT * FROM test.my_table ORDER BY myint_id ASC FORMAT JSONEachRow SETTINGS output_format_json_named_tuples_as_objects=1;")
6566
.wireTap((allLines: ByteString) => logger.debug("Raw JSON records all-in-one: \n" + allLines.utf8String))
6667
.via(Framing.delimiter(ByteString.fromString(System.lineSeparator()), 1024))

src/main/scala/alpakka/dynamodb/DynamoDBEcho.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class DynamoDBEcho(urlWithMappedPort: URI, accessKey: String, secretKey: String,
3333

3434
private val testTableName = "testTable"
3535

36-
val credentialsProvider = StaticCredentialsProvider.create(AwsBasicCredentials.create(accessKey, secretKey))
36+
val credentialsProvider: StaticCredentialsProvider = StaticCredentialsProvider.create(AwsBasicCredentials.create(accessKey, secretKey))
3737
implicit val client: DynamoDbAsyncClient = createAsyncClient()
3838

3939
def run(noOfItems: Int): Future[Int] = {

src/main/scala/alpakka/env/FileServer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ object FileServer extends App {
107107
}
108108
}
109109

110-
def randomSleeper() = {
110+
def randomSleeper(): Unit = {
111111
val (start, end) = (1000, 10000)
112112
val rnd = new scala.util.Random
113113
val sleepTime = start + rnd.nextInt((end - start) + 1)

src/main/scala/alpakka/env/KafkaServerTestcontainers.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ class KafkaServerTestcontainers {
2424
val imageName = s"confluentinc/cp-kafka:$kafkaVersion"
2525
val originalPort = 9093
2626
var mappedPort = 1111
27-
val kafkaContainer = new KafkaContainer(DockerImageName.parse(imageName)).
27+
val kafkaContainer: KafkaContainer = new KafkaContainer(DockerImageName.parse(imageName)).
2828
withExposedPorts(originalPort)
2929

30-
def run() = {
30+
def run(): Unit = {
3131
kafkaContainer.start()
3232
mappedPort = kafkaContainer.getMappedPort(originalPort)
3333
logger.info(s"Running Kafka: $imageName on mapped port: $mappedPort")
3434
}
3535

36-
def stop() = {
36+
def stop(): Unit = {
3737
kafkaContainer.stop()
3838
}
3939
}

src/main/scala/alpakka/env/WebsocketServer.scala

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
package alpakka.env
22

3-
import org.apache.pekko.actor.ActorSystem
3+
import org.apache.pekko.actor.{ActorSystem, Terminated}
44
import org.apache.pekko.http.scaladsl.Http
5-
import org.apache.pekko.http.scaladsl.model.ws._
6-
import org.apache.pekko.http.scaladsl.server.Directives._
5+
import org.apache.pekko.http.scaladsl.model.ws.*
6+
import org.apache.pekko.http.scaladsl.server.Directives.*
77
import org.apache.pekko.http.scaladsl.server.Route
88
import org.apache.pekko.http.scaladsl.server.directives.WebSocketDirectives
99
import org.apache.pekko.stream.scaladsl.{Flow, Sink, Source}
1010
import org.slf4j.{Logger, LoggerFactory}
1111

12-
import scala.concurrent.duration._
12+
import scala.concurrent.duration.*
1313
import scala.concurrent.{Await, Future}
1414
import scala.language.postfixOps
1515
import scala.util.{Failure, Success}
@@ -27,11 +27,11 @@ class WebsocketServer extends WebSocketDirectives {
2727
val (address, port) = ("127.0.0.1", 6002)
2828
var serverBinding: Future[Http.ServerBinding] = _
2929

30-
def run() = {
30+
def run(): Unit = {
3131
server(address, port)
3232
}
3333

34-
def stop() = {
34+
def stop(): Future[Terminated] = {
3535
logger.info("About to shutdown...")
3636
val fut = serverBinding.map(serverBinding => serverBinding.terminate(hardDeadline = 3.seconds))
3737
logger.info("Waiting for connections to terminate...")
@@ -41,7 +41,7 @@ class WebsocketServer extends WebSocketDirectives {
4141
}
4242
}
4343

44-
private def server(address: String, port: Int) = {
44+
private def server(address: String, port: Int): Unit = {
4545

4646
def echoFlow: Flow[Message, Message, Any] =
4747
Flow[Message].mapConcat {

0 commit comments

Comments
 (0)