Strange test failure when referencing a class in a deprivileged	module
    Wang Weijun 
    weijun.wang at oracle.com
       
    Tue Jul  5 08:22:30 UTC 2016
    
    
  
> On Jul 5, 2016, at 11:53 AM, Wang Weijun <weijun.wang at oracle.com> wrote:
> 
> The exception is at the end of this mail. The test passes if I change X.go() to calling a method inside this class
Update: any call that triggers a permission check will do. For example:
import java.security.Permission;
import java.sql.SQLPermission;
public class SSL extends SecurityManager {
    @Override
    public void checkPermission(Permission perm, Object context) {
        checkPermission(perm);
    }
    public void checkPermission(Permission perm) {
        if (!(perm instanceof SQLPermission)) {
            return;
        }
    }
    public static void main(String[] args) throws Exception {
        System.setSecurityManager(new SSL());
        System.getProperty("os.name");
    }
}
    
    
More information about the jigsaw-dev
mailing list