Code example for CodeSource

Methods: getCodeSigners

     * getCodeSigners() must not take into account non-X509 certificates. 
    public void testGetCodeSigners_01() { 
        Certificate[] certs = { new TestCertUtils.TestCertificate("00") };
        CodeSource cs = new CodeSource(null, certs);
     * getCodeSigners() must return null if no X509 factory available 
    public void testGetCodeSigners_02() { 
        ArrayList al = new ArrayList();
        boolean noMoreFactories = false;
        try { 
            // remove all providers for x509 
            // 'for' loop here for the sake of avoiding endless loop - well, just  
            // in case if something is wrong with add/remove machinery. 
            // '100' seems reasonable big to remove all necessary providers 
Stop searching for code, let great code find you!  Add Codota to your java IDE