You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Leo Li (JIRA)" <ji...@apache.org> on 2007/04/13 04:38:15 UTC

[jira] Closed: (HARMONY-3549) [classlib][security]KeyStore.load(null) should not throw exception on the level of KeyStore class.

     [ https://issues.apache.org/jira/browse/HARMONY-3549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leo Li closed HARMONY-3549.
---------------------------


> [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
>          Components: Classlib
>            Reporter: Leo Li
>         Assigned To: Paulex Yang
>         Attachments: patch-3549.zip
>
>
> 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.