Skip to content

Commit 316d368

Browse files
authored
Merge pull request scala/scala#9788 from SethTisue/deprecation-cleanup
clean up deprecation warning suppression
2 parents dd10ddf + 20eb5e7 commit 316d368

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/src/scala/runtime/ModuleSerializationProxy.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ import scala.annotation.nowarn
1919

2020
private[runtime] object ModuleSerializationProxy {
2121
private val instances = new ClassValueCompat[Object] {
22-
@deprecated("", "") // because AccessController is deprecated on JDK 17
22+
@nowarn("cat=deprecation") // AccessController is deprecated on JDK 17
2323
def getModule(cls: Class[_]): Object =
2424
java.security.AccessController.doPrivileged(
2525
(() => cls.getField("MODULE$").get(null)): PrivilegedExceptionAction[Object])
2626
override protected def computeValue(cls: Class[_]): Object =
27-
try getModule(cls): @nowarn("cat=deprecation")
27+
try getModule(cls)
2828
catch {
2929
case e: PrivilegedActionException =>
3030
rethrowRuntime(e.getCause)

0 commit comments

Comments
 (0)