From 618ab68fceb0779190334b060d00eca27b490bdc Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Sat, 15 Jun 2024 08:23:38 -0400 Subject: [PATCH] Bump commons-parent from 69 to 71 Fix PMD UnnecessaryFullyQualifiedName issues --- .../org/apache/commons/mail2/jakarta/EmailAttachment.java | 2 +- .../main/java/org/apache/commons/mail2/jakarta/HtmlEmail.java | 4 ++-- .../java/org/apache/commons/mail2/javax/EmailAttachment.java | 2 +- .../main/java/org/apache/commons/mail2/javax/HtmlEmail.java | 4 ++-- pom.xml | 2 +- src/changes/changes.xml | 3 ++- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/commons-email2-jakarta/src/main/java/org/apache/commons/mail2/jakarta/EmailAttachment.java b/commons-email2-jakarta/src/main/java/org/apache/commons/mail2/jakarta/EmailAttachment.java index 09fba2123..556aa4d22 100644 --- a/commons-email2-jakarta/src/main/java/org/apache/commons/mail2/jakarta/EmailAttachment.java +++ b/commons-email2-jakarta/src/main/java/org/apache/commons/mail2/jakarta/EmailAttachment.java @@ -44,7 +44,7 @@ public class EmailAttachment { private URL url; /** The disposition. */ - private String disposition = EmailAttachment.ATTACHMENT; + private String disposition = ATTACHMENT; /** * Constructs a new instance. diff --git a/commons-email2-jakarta/src/main/java/org/apache/commons/mail2/jakarta/HtmlEmail.java b/commons-email2-jakarta/src/main/java/org/apache/commons/mail2/jakarta/HtmlEmail.java index f4e6a4b66..15d540da3 100644 --- a/commons-email2-jakarta/src/main/java/org/apache/commons/mail2/jakarta/HtmlEmail.java +++ b/commons-email2-jakarta/src/main/java/org/apache/commons/mail2/jakarta/HtmlEmail.java @@ -315,7 +315,7 @@ public String embed(final DataSource dataSource, final String name) throws Email + "; existing names cannot be rebound"); } - final String cid = EmailUtils.toLower(EmailUtils.randomAlphabetic(HtmlEmail.CID_LENGTH)); + final String cid = EmailUtils.toLower(EmailUtils.randomAlphabetic(CID_LENGTH)); return embed(dataSource, name, cid); } @@ -357,7 +357,7 @@ public String embed(final DataSource dataSource, final String name, final String * @since 1.1 */ public String embed(final File file) throws EmailException { - return embed(file, EmailUtils.toLower(EmailUtils.randomAlphabetic(HtmlEmail.CID_LENGTH))); + return embed(file, EmailUtils.toLower(EmailUtils.randomAlphabetic(CID_LENGTH))); } /** diff --git a/commons-email2-javax/src/main/java/org/apache/commons/mail2/javax/EmailAttachment.java b/commons-email2-javax/src/main/java/org/apache/commons/mail2/javax/EmailAttachment.java index e992debb2..9df6b48bd 100644 --- a/commons-email2-javax/src/main/java/org/apache/commons/mail2/javax/EmailAttachment.java +++ b/commons-email2-javax/src/main/java/org/apache/commons/mail2/javax/EmailAttachment.java @@ -44,7 +44,7 @@ public class EmailAttachment { private URL url; /** The disposition. */ - private String disposition = EmailAttachment.ATTACHMENT; + private String disposition = ATTACHMENT; /** * Constructs a new instance. diff --git a/commons-email2-javax/src/main/java/org/apache/commons/mail2/javax/HtmlEmail.java b/commons-email2-javax/src/main/java/org/apache/commons/mail2/javax/HtmlEmail.java index 6110ca69a..578111d71 100644 --- a/commons-email2-javax/src/main/java/org/apache/commons/mail2/javax/HtmlEmail.java +++ b/commons-email2-javax/src/main/java/org/apache/commons/mail2/javax/HtmlEmail.java @@ -315,7 +315,7 @@ public String embed(final DataSource dataSource, final String name) throws Email + "; existing names cannot be rebound"); } - final String cid = EmailUtils.toLower(EmailUtils.randomAlphabetic(HtmlEmail.CID_LENGTH)); + final String cid = EmailUtils.toLower(EmailUtils.randomAlphabetic(CID_LENGTH)); return embed(dataSource, name, cid); } @@ -357,7 +357,7 @@ public String embed(final DataSource dataSource, final String name, final String * @since 1.1 */ public String embed(final File file) throws EmailException { - return embed(file, EmailUtils.toLower(EmailUtils.randomAlphabetic(HtmlEmail.CID_LENGTH))); + return embed(file, EmailUtils.toLower(EmailUtils.randomAlphabetic(CID_LENGTH))); } /** diff --git a/pom.xml b/pom.xml index 001ca2639..6ce6319e4 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ org.apache.commons commons-parent - 69 + 71 4.0.0 commons-email2-parent diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 5f048fe87..1be80f8ba 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -28,11 +28,12 @@ Add Maven property project.build.outputTimestamp for build reproducibility. Fix Checkstyle configuration. + Fix PMD UnnecessaryFullyQualifiedName issues. Bump org.slf4j:slf4j-jdk14 from 2.0.9 to 2.0.13 #238. Bump com.github.davidmoten:subethasmtp from 6.0.7 to 7.1.1 #252. Bump org.mockito:mockito-core from 5.8.0 to 5.12.0 #222, #251. - Bump commons-parent from 65 to 69 #233. + Bump commons-parent from 65 to 71 #233. Bump commons-io:commons-io from 2.15.1 to 2.16.1 #231, #236.