Code example for KeyStoreException

0
            if (keyStoreName == null || keyStoreName.equalsIgnoreCase("NONE")
                    || keyStoreName.length() == 0) {
                try { 
                    keyStore.load(null, null);
                } catch (IOException e) {
                    throw new KeyStoreException(e);
                } catch (CertificateException e) {
                    throw new KeyStoreException(e);
                } 
            } else { 
                keyStorePwd = AccessController
                        .doPrivileged(new java.security.PrivilegedAction<String>() {
                            public String run() {
                                return System 
                                        .getProperty("javax.net.ssl.keyStorePassword");
                            } 
                        }); 
                if (keyStorePwd == null) {
                    pwd = new char[0];
                } else { 
                    pwd = keyStorePwd.toCharArray();