Skip to content

Commit 68c6f3f

Browse files
authored
Fix compiler warnings (#285)
1 parent 67be3b5 commit 68c6f3f

File tree

10 files changed

+28
-21
lines changed

10 files changed

+28
-21
lines changed

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ lazy val coreSettings = commonSettings ++ Seq(
2525
name := "RedisClient",
2626
libraryDependencies ++= Seq(
2727
"org.apache.commons" % "commons-pool2" % "2.8.0",
28-
"org.slf4j" % "slf4j-api" % "1.7.29",
29-
"org.slf4j" % "slf4j-log4j12" % "1.7.29" % "provided",
28+
"org.slf4j" % "slf4j-api" % "1.7.32",
29+
"org.slf4j" % "slf4j-log4j12" % "1.7.32" % "provided",
3030
"log4j" % "log4j" % "1.2.17" % "provided",
3131
"org.scalatest" %% "scalatest" % "3.1.0" % "test"
3232
) ++

src/test/scala/com/redis/PoolSpec.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
package com.redis
22

33
import com.redis.common.RedisDocker
4-
import org.scalatest.{BeforeAndAfterEach, FunSpec, Matchers}
4+
import org.scalatest.BeforeAndAfterEach
5+
import org.scalatest.funspec.AnyFunSpec
6+
import org.scalatest.matchers.should.Matchers
57

68
import scala.concurrent._
79
import scala.concurrent.duration._
810

9-
class PoolSpec extends FunSpec
11+
class PoolSpec extends AnyFunSpec
1012
with Matchers
1113
with BeforeAndAfterEach
1214
with RedisDocker {
@@ -27,7 +29,7 @@ class PoolSpec extends FunSpec
2729

2830
override def afterAll(): Unit = {
2931
clients.withClient{ client => client.disconnect }
30-
clients.close
32+
clients.close()
3133
super.afterAll()
3234
}
3335

src/test/scala/com/redis/PubSubSpec.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package com.redis
22

33
import com.redis.common.RedisDocker
4-
import org.scalatest.{FunSpec, Matchers}
4+
import org.scalatest.funspec.AnyFunSpec
5+
import org.scalatest.matchers.should.Matchers
56

6-
class PubSubSpec extends FunSpec
7+
class PubSubSpec extends AnyFunSpec
78
with Matchers
89
with RedisDocker {
910

@@ -37,7 +38,7 @@ class PubSubSpec extends FunSpec
3738
// exit will unsubscribe from all channels and stop subscription service
3839
case "exit" =>
3940
println("unsubscribe all ..")
40-
r.unsubscribe
41+
r.unsubscribe()
4142

4243
// message "+x" will subscribe to channel x
4344
case x if x startsWith "+" =>

src/test/scala/com/redis/SSLSpec.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import java.security.cert.X509Certificate
44
import org.apache.http.ssl.{SSLContexts, TrustStrategy}
55

66
import com.redis.common.RedisDockerSSL
7-
import org.scalatest.{FunSpec, Matchers}
7+
import org.scalatest.funspec.AnyFunSpec
8+
import org.scalatest.matchers.should.Matchers
89

9-
class SSLSpec extends FunSpec with Matchers with RedisDockerSSL {
10+
class SSLSpec extends AnyFunSpec with Matchers with RedisDockerSSL {
1011

1112
// Our certificate on the test server is self-signed, which will be
1213
// rejected by the default SSLContext. This SSLContext is therefore

src/test/scala/com/redis/SerializationSpec.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ package com.redis
22

33
import com.redis.common.IntSpec
44
import com.redis.serialization._
5-
import org.scalatest.{FunSpec, Matchers}
5+
import org.scalatest.funspec.AnyFunSpec
6+
import org.scalatest.matchers.should.Matchers
67

78

8-
class SerializationSpec extends FunSpec
9+
class SerializationSpec extends AnyFunSpec
910
with Matchers
1011
with IntSpec {
1112

src/test/scala/com/redis/WatchSpec.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
package com.redis
22

33
import com.redis.common.RedisDocker
4-
import org.scalatest.{FunSpec, Matchers}
4+
import org.scalatest.funspec.AnyFunSpec
5+
import org.scalatest.matchers.should.Matchers
56

67
import scala.concurrent.Future
78

8-
class WatchSpec extends FunSpec
9+
class WatchSpec extends AnyFunSpec
910
with Matchers
1011
with RedisDocker {
1112

@@ -33,7 +34,7 @@ class WatchSpec extends FunSpec
3334

3435
p2.futureValue should equal(true)
3536
p1.futureValue should equal(None)
36-
clients.close
37+
clients.close()
3738
}
3839
}
3940
}

src/test/scala/com/redis/cluster/ReconnectableSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class ReconnectableSpec extends AnyFunSpec with GivenWhenThen
7272
}
7373

7474
def waitForCluster(expected: List[ClusterNode] => Boolean, remaining: Int = 10,
75-
p: Promise[Boolean] = Promise[Boolean]): Future[Boolean] =
75+
p: Promise[Boolean] = Promise[Boolean]()): Future[Boolean] =
7676
if (expected(r.listServers)) {
7777
p.success(true).future
7878
} else if (remaining > 0) {

src/test/scala/com/redis/common/IntClusterSpec.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ trait IntClusterSpec extends BeforeAndAfterEach with RedisDockerCluster {
2020
format(key)
2121
}
2222

23-
override def afterAll: Unit = {
23+
override def afterAll(): Unit = {
2424
r.close()
2525
super.afterAll()
2626
}
2727

28-
override def afterEach: Unit = {
28+
override def afterEach(): Unit = {
2929
r.flushall
3030
super.afterEach()
3131
}

src/test/scala/com/redis/common/IntSpec.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ trait IntSpec extends BeforeAndAfterEach with RedisDocker {
88

99
protected def r: BaseApi with AutoCloseable
1010

11-
override def afterAll: Unit = {
11+
override def afterAll(): Unit = {
1212
r.close()
1313
super.afterAll()
1414
}
1515

16-
override def afterEach: Unit = {
16+
override def afterEach(): Unit = {
1717
r.flushall
1818
super.afterEach()
1919
}

src/test/scala/com/redis/common/StringTypeData.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
package com.redis.common
22

33
import com.redis.api.{BaseApi, StringApi}
4-
import org.scalatest.{GivenWhenThen, Informing, Matchers, Suite}
4+
import org.scalatest.{GivenWhenThen, Informing, Suite}
5+
import org.scalatest.matchers.should.Matchers
56

67
trait StringTypeData extends IntSpec with Matchers with GivenWhenThen {
78
that: Suite with Informing =>

0 commit comments

Comments
 (0)