sb.append("CodeSource:null" + linesep);
sb.append("CodeSource:null"); else sb.append(code_source);  sb.append(linesep); if (classloader == null) sb.append("ClassLoader:null"); else sb.append(classloader);  sb.append(linesep); sb.append("Principals:"); if (principals != null && principals.length > 0) { sb.append("["); Principal pal; for (int i = 0; i < principals.length; i++) { pal = principals[i]; sb.append("'").append(pal.getName()) .append("' of type ").append(pal.getClass().getName()); if (i < principals.length-1) sb.append(", "); } sb.append("]"); } else sb.append("none");  sb.append(linesep); if (!staticBinding) if (Policy.isLoaded()) sb.append(Policy.getCurrentPolicy().getPermissions(this)); else sb.append(perms);
    public String toString() {        String linesep = System.getProperty("line.separator");        StringBuffer sb = new StringBuffer("");        sb.append("ProtectionDomain (" + linesep);        if (code_source == null)            sb.append("CodeSource:null" + linesep);        else            sb.append(code_source + linesep);        sb.append(perms);        sb.append(linesep + ")" + linesep);        return sb.toString();    }