From 0aa66bcc2a55c4db9f4bcf82ebcab3fe19e045d4 Mon Sep 17 00:00:00 2001 From: Alex Earl Date: Fri, 15 Nov 2024 19:25:41 -0700 Subject: [PATCH] Fix spotless issues Fix spotless issues for build. --- .../hudson/plugins/emailext/EmailRecipientUtils.java | 2 +- .../hudson/plugins/emailext/EmailRecipientUtilsTest.java | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/hudson/plugins/emailext/EmailRecipientUtils.java b/src/main/java/hudson/plugins/emailext/EmailRecipientUtils.java index 7b917967..e8ab3a58 100644 --- a/src/main/java/hudson/plugins/emailext/EmailRecipientUtils.java +++ b/src/main/java/hudson/plugins/emailext/EmailRecipientUtils.java @@ -141,7 +141,7 @@ static String fixupDelimiters(String input) { // we only need to do more fixup if there are spaces in the string if (input.contains(" ")) { - if(!input.contains("<") && !input.contains(("("))) { + if (!input.contains("<") && !input.contains(("("))) { input = input.replace(" ", ", "); } else { StringBuilder builder = new StringBuilder(input); diff --git a/src/test/java/hudson/plugins/emailext/EmailRecipientUtilsTest.java b/src/test/java/hudson/plugins/emailext/EmailRecipientUtilsTest.java index e98766b8..767defb4 100644 --- a/src/test/java/hudson/plugins/emailext/EmailRecipientUtilsTest.java +++ b/src/test/java/hudson/plugins/emailext/EmailRecipientUtilsTest.java @@ -1,11 +1,11 @@ package hudson.plugins.emailext; -import jakarta.mail.internet.InternetAddress; -import org.junit.Test; - import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; +import jakarta.mail.internet.InternetAddress; +import org.junit.Test; + public class EmailRecipientUtilsTest { @Test public void testFixupDelimiters() throws Exception { @@ -17,7 +17,8 @@ public void testFixupDelimiters() throws Exception { assertEquals("Name Surname", addresses[0].getPersonal()); assertEquals("n.Surname@mymail.com", addresses[0].getAddress()); - output = EmailRecipientUtils.fixupDelimiters("user0, user1@email.com User Two user3@email.com "); + output = EmailRecipientUtils.fixupDelimiters( + "user0, user1@email.com User Two user3@email.com "); assertEquals("user0, user1@email.com, User Two , user3@email.com", output); addresses = InternetAddress.parse(output); assertEquals(4, addresses.length);