File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
util-tunable/src/main/scala/com/twitter/util/tunable Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ val defaultScalaSettings = Seq(
8989)
9090val defaultScala3EnabledSettings = Seq (
9191 scalaVersion := _scalaVersion,
92- crossScalaVersions := _crossScalaVersions ++ Seq (" 3.0 .2" )
92+ crossScalaVersions := _crossScalaVersions ++ Seq (" 3.2 .2" )
9393)
9494
9595// Our dependencies or compiler options may differ for both Scala 2 and 3. We branch here
@@ -678,7 +678,7 @@ lazy val utilTunable = Project(
678678 id = " util-tunable" ,
679679 base = file(" util-tunable" )
680680).settings(
681- sharedSettings
681+ sharedScala3EnabledSettings
682682 ).settings(
683683 name := " util-tunable" ,
684684 libraryDependencies ++= Seq (
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import java.util.function.BiFunction
55import scala .annotation .varargs
66import scala .collection .mutable
77import scala .jdk .CollectionConverters ._
8+ import scala .reflect .ClassTag
89
910/**
1011 * A Map that can be used to access [[Tunable ]]s using [[TunableMap.Key ]]s.
@@ -133,7 +134,7 @@ object TunableMap {
133134 }
134135
135136 object Key {
136- def apply [T ](id : String )(implicit m : Manifest [T ]): Key [T ] =
137+ def apply [T ](id : String )(implicit m : ClassTag [T ]): Key [T ] =
137138 Key [T ](id, m.runtimeClass.asInstanceOf [Class [T ]])
138139 }
139140
@@ -199,7 +200,7 @@ object TunableMap {
199200 * Put a [[Tunable ]] with id `id` and value `value` into the [[TunableMap ]]. If the [[Tunable ]]
200201 * for that `id` already exists, update the value to `value`.
201202 */
202- final def put [T ](id : String , value : T )(implicit m : Manifest [T ]): Key [T ] =
203+ final def put [T ](id : String , value : T )(implicit m : ClassTag [T ]): Key [T ] =
203204 put[T ](id, m.runtimeClass.asInstanceOf [Class [T ]], value)
204205
205206 /**
You can’t perform that action at this time.
0 commit comments