Search in sources :

Example 1 with ModularProtectionDomain

use of org.jboss.modules.security.ModularProtectionDomain in project jboss-modules by jboss-modules.

the class ModuleClassLoader method getProtectionDomain.

private ProtectionDomain getProtectionDomain(CodeSource codeSource) {
    final IdentityHashMap<CodeSource, ProtectionDomain> map = protectionDomains;
    synchronized (map) {
        ProtectionDomain protectionDomain = map.get(codeSource);
        if (protectionDomain == null) {
            final PermissionCollection permissions = module.getPermissionCollection();
            protectionDomain = new ModularProtectionDomain(codeSource, permissions, this);
            map.put(codeSource, protectionDomain);
        }
        return protectionDomain;
    }
}
Also used : ModularProtectionDomain(org.jboss.modules.security.ModularProtectionDomain) ProtectionDomain(java.security.ProtectionDomain) ModularProtectionDomain(org.jboss.modules.security.ModularProtectionDomain) PermissionCollection(java.security.PermissionCollection) CodeSource(java.security.CodeSource)

Aggregations

CodeSource (java.security.CodeSource)1 PermissionCollection (java.security.PermissionCollection)1 ProtectionDomain (java.security.ProtectionDomain)1 ModularProtectionDomain (org.jboss.modules.security.ModularProtectionDomain)1