Code example for PKIXParameters

Methods: getCertPathCheckers, setCertPathCheckers

0
        Set taSet = TestUtils.getTrustAnchorSet();
        if (taSet == null) {
            fail(getName() + ": not performed (could not create test TrustAnchor set)");
        } 
 
        PKIXParameters p = new PKIXParameters(taSet);
        p.setCertPathCheckers(null);
        List l1 = p.getCertPathCheckers();
        assertNotNull("notNull1", l1);
        assertTrue("isEmpty1", l1.isEmpty());
        p.setCertPathCheckers(new ArrayList());
        List l2 = p.getCertPathCheckers();
        assertNotNull("notNull2", l2);
        assertTrue("isEmpty2", l2.isEmpty());
    } 
 
    /** 
     * Test #3 for <code>setCertPathCheckers(List)</code> method<br> 
     * Assertion: <code>List</code> supplied here is copied and each 
     * <code>PKIXCertPathChecker</code> in the list is cloned to protect 
     * against subsequent modifications