harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Li (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-3549) [classlib][security]KeyStore.load(null) should not throw exception on the level of KeyStore class.
Date Tue, 03 Apr 2007 07:13:32 GMT
[classlib][security]KeyStore.load(null) should not throw exception on the level of KeyStore
class.
--------------------------------------------------------------------------------------------------

                 Key: HARMONY-3549
                 URL: https://issues.apache.org/jira/browse/HARMONY-3549
             Project: Harmony
          Issue Type: Bug
            Reporter: Leo Li


Here is a testcase:
         public void test_load_null{
             MyKeyStore myKeyStore = new MyKeyStore(new MyKeyStoreSpi(), null ,"MyKeyStore");
             myKeyStore.load(null);
         }

        private static class MyKeyStore extends KeyStore {

        public MyKeyStore(KeyStoreSpi keyStoreSpi, Provider provider,
                String type) {
            super(keyStoreSpi, provider, type);
        }
    }

    private static class MyKeyStoreSpi extends KeyStoreSpi {

        public Enumeration<String> engineAliases() {
            return null;
        }

        public boolean engineContainsAlias(String arg0) {
            return false;
        }

        public void engineDeleteEntry(String arg0) throws KeyStoreException {
        }

        public Certificate engineGetCertificate(String arg0) {
            return null;
        }

        public String engineGetCertificateAlias(Certificate arg0) {
            return null;
        }

        public Certificate[] engineGetCertificateChain(String arg0) {
            return null;
        }

        public Date engineGetCreationDate(String arg0) {
            return null;
        }

        public Key engineGetKey(String arg0, char[] arg1)
                throws NoSuchAlgorithmException, UnrecoverableKeyException {
            return null;
        }

        public boolean engineIsCertificateEntry(String arg0) {
            return false;
        }

        public boolean engineIsKeyEntry(String arg0) {
            return false;
        }

        public void engineLoad(InputStream arg0, char[] arg1)
                throws IOException, NoSuchAlgorithmException,
                CertificateException {
            return;
        }

        public void engineSetCertificateEntry(String arg0, Certificate arg1)
                throws KeyStoreException {
            return;
        }

        public void engineSetKeyEntry(String arg0, byte[] arg1,
                Certificate[] arg2) throws KeyStoreException {
            return;
        }

        public void engineSetKeyEntry(String arg0, Key arg1, char[] arg2,
                Certificate[] arg3) throws KeyStoreException {
            return;
        }

        public int engineSize() {
            return 0;
        }

        public void engineStore(KeyStore.LoadStoreParameter param){
            return;
        }

        public void engineStore(OutputStream arg0, char[] arg1)
                throws IOException, NoSuchAlgorithmException,
                CertificateException {
            return;
        }        
    }

RI passes.
Harmony fails with IOException thrown out.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message