I have a simple core java question. I have a list which carries multiple response codes. I am returning messages based on the response codes in my list. For one of the scenarios I have to check if the list contains any one of the response codes in it. I have done it the following ways but it ignores it and the codes goes to the else block. So if the the code is ES03 or ES04 or any one of them I want to populate the emailValidationMessage variable but it doesn't do it.
List<String> messageCodes = this.getEmailValidationCode( eSignatureInTO );
if( messageCodes.contains( "ES01" ) ) {
IESignatureIntegrationOutDto eSignatureOutTO = getEsignService().resendDocuments( eSignatureInTO );
eSignatureInTO.setResendDocs( eSignatureOutTO.isResendDocs() );
} else if( messageCodes.contains( "EE01" ) ) {
emailValidationMessage = UiIntegrationKeyConstants.EMAIL_FORMAT_ERROR_MESSAGE;
} else if( messageCodes.contains( Arrays.asList( "ES02", "ES03", "ES04", "EE02", "EE03", "EE04" ) ) ) {
emailValidationMessage = UiIntegrationKeyConstants.EMAIL_VALIDATION_ERROR_MESSAGE;
} else {
emailValidationMessage = UiIntegrationKeyConstants.EMAIL_VALIDATION_MESSAGE;
}
Thanks...