Skip to content

Commit

Permalink
Changes to fix deprecations for Scala 2.13-M4
Browse files Browse the repository at this point in the history
  • Loading branch information
debasishg committed Sep 15, 2018
1 parent 94e503a commit 13c19ac
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ lazy val redisClient = (project in file(".")).settings(coreSettings : _*)

lazy val commonSettings: Seq[Setting[_]] = Seq(
organization := "net.debasishg",
version := "3.7",
version := "3.8",
scalaVersion := "2.12.6",
crossScalaVersions := Seq("2.12.6", "2.11.12", "2.10.7", "2.13.0-M4"),

Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/com/redis/IO.scala
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ trait IO extends Log {
} else {
if (found != Nil) {
delimiter = crlf
build ++= found.reverseMap(_.toByte)
build ++= found.reverseIterator.map(_.toByte).toList
found = Nil
}
build += next.toByte
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/com/redis/cluster/HashRing.scala
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ case class HashRing[T](nodes: List[T], replicas: Int) {
def isEmpty: Boolean = ring.isEmpty

private def nodeHashFor(node: T, replica: Int): Long = {
calculateChecksum((node + ":" + replica).getBytes("UTF-8"))
calculateChecksum((node + ":" + replica).getBytes("UTF-8").toIndexedSeq)
}

}
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/com/redis/cluster/RedisCluster.scala
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ abstract class RedisCluster(hosts: ClusterNode*) extends RedisCommand {
// get node for the key
def nodeForKey(key: Any)(implicit format: Format): IdentifiableRedisClientPool = {
val bKey = format(key)
hr.getNode(keyTag.flatMap(_.tag(bKey)).getOrElse(bKey))
hr.getNode(keyTag.flatMap(_.tag(bKey.toIndexedSeq)).getOrElse(bKey.toIndexedSeq))
}

def processForKey[T](key: Any)(body: RedisCommand => T)(implicit format: Format): T = {
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/com/redis/cluster/RedisShards.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ abstract class RedisShards(val hosts: List[ClusterNode]) extends RedisCommand {
// get node for the key
def nodeForKey(key: Any)(implicit format: Format): RedisClientPool = {
val bKey = format(key)
val selectedNode = hr.getNode(keyTag.flatMap(_.tag(bKey)).getOrElse(bKey))
val selectedNode = hr.getNode(keyTag.flatMap(_.tag(bKey.toIndexedSeq)).getOrElse(bKey.toIndexedSeq))
clients(selectedNode)
}

Expand Down

0 comments on commit 13c19ac

Please sign in to comment.