Code example for Permission

Methods: getName

0
            } 
             
            @Override 
            public void checkPermission(Permission p) {
                if(p instanceof RuntimePermission 
                && "getClassLoader".equals(p.getName())) {
                    called = true;
                } 
            } 
        } 
        TestSecurityManager sm = new TestSecurityManager();
 
        Thread t1 = new Thread();
        Thread t2 = new Thread();
        Thread t3 = new Thread();
        Thread t4 = new Thread();
        Thread t5 = new Thread();
         
        assertNotNull("test assumption: caller's class loader must not be null",
                this.getClass().getClassLoader());