Code example for UnresolvedPermission

Methods: getUnresolvedActionsgetUnresolvedCertsgetUnresolvedNamegetUnresolvedType

0
        f = new File(System.getProperty("test.src", "."), SIGNER2);
        fis = new FileInputStream(f);
        Certificate signer2 = fac.generateCertificate(fis);
        signercerts[2] = signer2; 
 
        UnresolvedPermission up = new UnresolvedPermission
                        ("type", "name", "actions", signercerts); 
        if (!up.getUnresolvedType().equals("type") ||
            !up.getUnresolvedName().equals("name") ||
            !up.getUnresolvedActions().equals("actions")) {
            throw new SecurityException("Test 1 Failed");
        } 
 
        Certificate[] certs = up.getUnresolvedCerts();
        if (certs == null || certs.length != 2) { 
            throw new SecurityException("Test 2 Failed");
        } 
 
        boolean foundSigner1 = false;
        boolean foundSigner2 = false;
        if (certs[0].equals(signer1) || certs[1].equals(signer1)) {