Source:
private static SSLConfiguration setSslConfig(OMElement sslConfig) { Iterator iterator = sslConfig.getChildElements(); String trustStore = null; String keyStore = null; String clientAuth = null; String httpsProtocols = null; String revocationVerifier = null; String sslProtocol = null; String prefferedCiphers = null; while (iterator.hasNext()) { OMElement parameter = (OMElement) iterator.next(); if (parameter.getFirstElement() != null) { if (KEYSTORE_ATT.equals(parameter.getAttributeValue(NAME_ATT))) { keyStore = parameter.getFirstElement().toString(); } else if (TRUSTSTORE_ATT.equals(parameter.getAttributeValue(NAME_ATT))) { trustStore = parameter.getFirstElement().toString(); } else if (CERTIFICATE_REVOCATION_VERIFIER_ATT.equals(parameter.getAttributeValue(NAME_ATT))) { revocationVerifier = parameter.getFirstElement().toString(); } else { handleException("Invalid parameter found for internal API ssl configuration"); } } else { if (SSL_PROTOCOL_ATT.equals(parameter.getAttributeValue(NAME_ATT))) { sslProtocol = parameter.getText(); } else if (PREFERRED_CIPHERS_ATT.equals(parameter.getAttributeValue(NAME_ATT))) { prefferedCiphers = parameter.getText(); } else if (HTTPS_PROTOCOLS_ATT.equals(parameter.getAttributeValue(NAME_ATT))) { httpsProtocols = parameter.getText(); } else if (SSL_VERIFY_CLIENT_ATT.equals(parameter.getAttributeValue(NAME_ATT))) { clientAuth = parameter.getText(); } else { handleException("Invalid parameter found for internal API ssl configuration"); } } } if (keyStore == null) { log.error("Keystore must be specified to configure internal Https Api."); } else { sslConfiguredSuccessfully = true; } return new SSLConfiguration(keyStore, trustStore, clientAuth, httpsProtocols, revocationVerifier, sslProtocol, prefferedCiphers); }

Target:
private static SSLConfiguration setSslConfig(OMElement sslConfig) { Iterator iterator = sslConfig.getChildElements(); String trustStore = null; String keyStore = null; String clientAuth = null; String httpsProtocols = null; String revocationVerifier = null; String sslProtocol = null; String prefferedCiphers = null; while (iterator.hasNext()) { OMElement parameter = (OMElement) iterator.next(); String attributeName = parameter.getAttributeValue(NAME_ATT); if (parameter.getFirstElement() != null) { String value = parameter.getFirstElement().toString(); switch (attributeName) { case KEYSTORE_ATT: keyStore = value; break; case TRUSTSTORE_ATT: trustStore = value; break; case CERTIFICATE_REVOCATION_VERIFIER_ATT: revocationVerifier = value; break; default: handleException("Invalid parameter found for internal API ssl configuration"); } } else { String value = parameter.getText(); switch (attributeName) { case SSL_PROTOCOL_ATT: sslProtocol = value; break; case PREFERRED_CIPHERS_ATT: prefferedCiphers = value; break; case HTTPS_PROTOCOLS_ATT: httpsProtocols = value; break; case SSL_VERIFY_CLIENT_ATT: clientAuth = value; break; default: handleException("Invalid parameter found for internal API ssl configuration"); } } } if (keyStore == null) { log.error("Keystore must be specified to configure internal Https Api."); } else { sslConfiguredSuccessfully = true; } return new SSLConfiguration(keyStore, trustStore, clientAuth, httpsProtocols, revocationVerifier, sslProtocol, prefferedCiphers); }