-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSecurityManagerTest.java
More file actions
25 lines (21 loc) · 690 Bytes
/
SecurityManagerTest.java
File metadata and controls
25 lines (21 loc) · 690 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import org.junit.Test;
/**
* @author wincher
* <p> PACKAGE_NAME <p>
*/
public class SecurityManagerTest {
@Test
public void test() {
RuntimePermission modifyThreadPermission = new RuntimePermission("modifyThread");
SecurityManager security = System.getSecurityManager();
if (security != null)
security.checkPermission(modifyThreadPermission);
}
@Test
public void test2() {
RuntimePermission modifyThreadPermission = new RuntimePermission("modifyThread");
SecurityManager security = System.getSecurityManager();
if (security != null)
security.checkPermission(modifyThreadPermission);
}
}