1 /*
2  * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3  */
4 
5 package kotlinx.coroutines
6 
7 import java.security.Permission
8 
9 @Suppress("unused")
10 class TestSecurityManager : SecurityManager() {
checkPropertyAccessnull11     override fun checkPropertyAccess(key: String?) {
12         if (key?.startsWith("kotlinx.") == true)
13             throw SecurityException("'$key' property is not allowed")
14     }
15 
checkPermissionnull16     override fun checkPermission(perm: Permission?) {
17         /* allow everything else */
18     }
19 }