File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
library/src/scala/reflect Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ object ClassTag {
137
137
val Nothing : ClassTag [scala.Nothing ] = Manifest .Nothing
138
138
val Null : ClassTag [scala.Null ] = Manifest .Null
139
139
140
- private val cacheDisabledProp = scala.sys. Prop [ String ] (" scala.reflect.classtag.cache.disable" )
140
+ private val cacheDisabled = java.lang. Boolean .getBoolean (" scala.reflect.classtag.cache.disable" )
141
141
private [this ] object cache extends ClassValue [jWeakReference[ClassTag [_]]] {
142
142
override def computeValue (runtimeClass : jClass[_]): jWeakReference[ClassTag [_]] =
143
143
new jWeakReference(computeTag(runtimeClass))
@@ -173,9 +173,9 @@ object ClassTag {
173
173
}
174
174
175
175
def apply [T ](runtimeClass1 : jClass[_]): ClassTag [T ] = {
176
- if (cacheDisabledProp.isSet)
176
+ if (cacheDisabled) {
177
177
cache.computeTag(runtimeClass1).asInstanceOf [ClassTag [T ]]
178
- else {
178
+ } else {
179
179
val ref = cache.get(runtimeClass1).asInstanceOf [jWeakReference[ClassTag [T ]]]
180
180
var tag = ref.get
181
181
if (tag == null ) {
You can’t perform that action at this time.
0 commit comments