for (Iterator it = cs2pc.entrySet().iterator(); it.hasNext();) { final Map.Entry e = (Map.Entry) it.next(); final CodeSource cs = (CodeSource) e.getKey(); if (cs.implies(codeSource)) { debug(cs + " -> " + codeSource); final PermissionCollection pc = (PermissionCollection) e .getValue(); for (Enumeration ee = pc.elements(); ee.hasMoreElements();) {
for (Iterator it = cs2pc.entrySet().iterator(); it.hasNext(); ) { Map.Entry e = (Map.Entry) it.next(); CodeSource cs = (CodeSource) e.getKey(); if (cs.implies(codeSource)) { logger.log (Component.POLICY, "{0} -> {1}", new Object[] { cs, codeSource }); PermissionCollection pc = (PermissionCollection) e.getValue(); for (Enumeration ee = pc.elements(); ee.hasMoreElements(); ) {
    public final PermissionCollection getPermissions(CodeSource codeSource) {        Permissions perms = new Permissions();        for (Iterator it = cs2pc.entrySet().iterator(); it.hasNext();) {            final Map.Entry e = (Map.Entry) it.next();            final CodeSource cs = (CodeSource) e.getKey();            if (cs.implies(codeSource)) {                debug(cs + " -> " + codeSource);                final PermissionCollection pc = (PermissionCollection) e                        .getValue();                for (Enumeration ee = pc.elements(); ee.hasMoreElements();) {                    perms.add((Permission) ee.nextElement());                }            } else {                debug(cs + " !-> " + codeSource);            }        }        addPermissions(codeSource, perms);        //perms.setReadOnly();        //debug("return from getPermissions");        return perms;    }