Skip to content

Commit

Permalink
Fix file formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
ajarzyn committed Dec 1, 2023
1 parent 1e501f0 commit 771870d
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/main/java/hudson/plugins/emailext/EmailRecipientUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class EmailRecipientUtils {
public static final int TO = 0;
public static final int CC = 1;
public static final int BCC = 2;

private static final String EMAIL_LIST_SPLIT_BY = "[ ;,]";

public static Set<InternetAddress> convertRecipientString(String recipientList, EnvVars envVars)
Expand Down Expand Up @@ -140,19 +140,15 @@ public FormValidation validateFormRecipientList(String recipientList) {
private static String fixupDelimiters(String input) {
String[] splitEmailList = input.split(EMAIL_LIST_SPLIT_BY);
StringBuilder inputBuilder = new StringBuilder();
for(String s : splitEmailList)
{
if(!s.isEmpty())
{
for (String s : splitEmailList) {
if (!s.isEmpty()) {
inputBuilder.append(s);
if(!s.contains("@")) {
if (!s.contains("@")) {
inputBuilder.append(" ");
}
else {
} else {
inputBuilder.append(",");
}
}

}
return inputBuilder.toString();
}
Expand Down

0 comments on commit 771870d

Please sign in to comment.