Skip to content

Commit 116bc18

Browse files
authored
Merge pull request scala/scala#9816 from SethTisue/fix-build
fix build (JDK 17 + bootstrapped + fatal warnings)
2 parents a3e170f + 09a7a29 commit 116bc18

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/src/scala/sys/SystemProperties.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ extends mutable.AbstractMap[String, String] {
5252
def subtractOne (key: String): this.type = { wrapAccess(System.clearProperty(key)) ; this }
5353
def addOne (kv: (String, String)): this.type = { wrapAccess(System.setProperty(kv._1, kv._2)) ; this }
5454

55+
@annotation.nowarn("cat=deprecation") // AccessControlException is deprecated on JDK 17
5556
def wrapAccess[T](body: => T): Option[T] =
5657
try Some(body) catch { case _: AccessControlException => None }
5758
}

0 commit comments

Comments
 (0)