Source:
protected void initKeyHolder() throws Exception { Constructor<?> keyHolderConstructor; try { keyHolderConstructor = keyHolderClass.getConstructor(new Class[] {String.class, String.class, String.class, String.class, String.class}); } catch (NoSuchMethodException nsme) { throw new MessagingException("The needed constructor does not exist: " + keyHolderClass + "(String, String, String, String, String)"); } String keyStoreFileName = getInitParameter("keyStoreFileName"); if (keyStoreFileName == null) { throw new MessagingException("<keyStoreFileName> parameter missing."); } String keyStorePassword = getInitParameter("keyStorePassword"); if (keyStorePassword == null) { throw new MessagingException("<keyStorePassword> parameter missing."); } String keyAliasPassword = getInitParameter("keyAliasPassword"); if (keyAliasPassword == null) { keyAliasPassword = keyStorePassword; if (isDebug()) { LOGGER.debug("<keyAliasPassword> parameter not specified: will default to the <keyStorePassword> parameter."); } } String keyStoreType = getInitParameter("keyStoreType"); if (keyStoreType == null) { if (isDebug()) { LOGGER.debug("<keyStoreType> parameter not specified: the default will be as appropriate to the keyStore requested."); } } String keyAlias = getInitParameter("keyAlias"); if (keyAlias == null) { if (isDebug()) { LOGGER.debug("<keyAlias> parameter not specified: will look for the first one in the keystore."); } } if (isDebug()) { LOGGER.debug("KeyStore related parameters:" + " keyStoreFileName={}" + ", keyStoreType={}" + ", keyAlias={}", keyStoreFileName, keyStoreType, keyAlias); } Object[] parameters = {keyStoreFileName, keyStorePassword, keyAlias, keyAliasPassword, keyStoreType}; setKeyHolder((KeyHolder)keyHolderConstructor.newInstance(parameters)); if (isDebug()) { LOGGER.debug("Subject Distinguished Name: {}", getKeyHolder().getSignerDistinguishedName()); } if (getKeyHolder().getSignerAddress() == null) { throw new MessagingException("Signer address missing in the certificate."); } }

Target:
protected void initKeyHolder() throws Exception { Constructor<?> keyHolderConstructor; try { keyHolderConstructor = keyHolderClass.getConstructor(new Class[] {String.class, String.class, String.class, String.class, String.class}); } catch (NoSuchMethodException nsme) { throw new MessagingException("The needed constructor does not exist: " + keyHolderClass + "(String, String, String, String, String)"); } String keyStoreFileName = getInitParameter("keyStoreFileName"); if (keyStoreFileName == null) { throw new MessagingException("<keyStoreFileName> parameter missing."); } String keyStorePassword = getInitParameter("keyStorePassword"); if (keyStorePassword == null) { throw new MessagingException("<keyStorePassword> parameter missing."); } String keyAliasPassword = getInitParameter("keyAliasPassword"); if (keyAliasPassword == null) { keyAliasPassword = keyStorePassword; if (isDebug()) { LOGGER.debug("<keyAliasPassword> parameter not specified: will default to the <keyStorePassword> parameter."); } } String keyStoreType = getInitParameter("keyStoreType"); if (keyStoreType == null) { if (isDebug()) { LOGGER.debug("<keyStoreType> parameter not specified: the default will be as appropriate to the keyStore requested."); } } String keyAlias = getInitParameter("keyAlias"); if (keyAlias == null) { if (isDebug()) { LOGGER.debug("<keyAlias> parameter not specified: will look for the first one in the keystore."); } } if (isDebug()) { LOGGER.debug("KeyStore related parameters: keyStoreFileName={}, keyStoreType={}, keyAlias={}", keyStoreFileName, keyStoreType, keyAlias); } Object[] parameters = {keyStoreFileName, keyStorePassword, keyAlias, keyAliasPassword, keyStoreType}; setKeyHolder((KeyHolder)keyHolderConstructor.newInstance(parameters)); if (isDebug()) { LOGGER.debug("Subject Distinguished Name: {}", getKeyHolder().getSignerDistinguishedName()); } if (getKeyHolder().getSignerAddress() == null) { throw new MessagingException("Signer address missing in the certificate."); } }