Safety Property: CheckPackages



property CheckPackages {
    check RJavaClass.accessPackage (p: String) {
        SecurityManager security = getSecurityManager ();
    
        if (security != null) {
            security.checkPackageAccess (p);
        }
    }

    check RJavaClass.defineClassInPackage (p: String) {
        SecurityManager security = getSecurityManager ();
    
        if (security != null) {
            security.checkPackageDefinition (p);
        }
    }  
}

About this file

Naccio Home Page
David Evans
University of Virginia, Computer Science