From cc980c6e46b67f3da4b2a3e032dea09b60846de0 Mon Sep 17 00:00:00 2001 From: gm2552 Date: Wed, 23 Jan 2019 12:49:23 -0600 Subject: [PATCH 1/5] Updating project version to 6.1-SNAPSHOT --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 632184a..ea85fda 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 direct-msg-monitor-model Direct Project Message Monitor Data Model Objects - 6.0 + 6.1-SNAPSHOT Direct Project Message Monitor Data Model Objects 2018 https://github.com/DirectProjectJavaRI/direct-msg-monitor-model From 5b6b00ff2a810637abfcfd1d5af35ba54f5f5509 Mon Sep 17 00:00:00 2001 From: gm2552 Date: Fri, 8 Mar 2019 07:13:01 -0600 Subject: [PATCH 2/5] Updating to SpringBoot 2.1.3 and SpringCloud Greenwich.SR1 --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index ea85fda..5ccef26 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 direct-msg-monitor-model Direct Project Message Monitor Data Model Objects - 6.1-SNAPSHOT + 6.0.1-SNAPSHOT Direct Project Message Monitor Data Model Objects 2018 https://github.com/DirectProjectJavaRI/direct-msg-monitor-model @@ -28,7 +28,7 @@ org.springframework.boot spring-boot-dependencies - 2.1.2.RELEASE + 2.1.3.RELEASE scm:git:https://github.com/DirectProjectJavaRI/direct-msg-monitor-model.git @@ -44,7 +44,7 @@ org.nhind direct-common - 6.0 + 6.0.1-SNAPSHOT javax.mail From f9ded0105aea2053cdc837fbb4207574c8ebeae5 Mon Sep 17 00:00:00 2001 From: gm2552 Date: Fri, 8 Mar 2019 10:46:45 -0600 Subject: [PATCH 3/5] Updating javadoc to version 2.9.1 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 5ccef26..087b017 100644 --- a/pom.xml +++ b/pom.xml @@ -174,7 +174,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 2.6.1 + 2.9.1 -Xdoclint:none UTF-8 @@ -225,7 +225,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 2.6.1 + 2.9.1 -Xdoclint:none UTF-8 From c0ec92f99bd39ba4737fb1d4d08a8f9a7f92a4c7 Mon Sep 17 00:00:00 2001 From: gm2552 Date: Wed, 28 Jul 2021 18:29:19 -0500 Subject: [PATCH 4/5] Initial Direct RI 8.0.0 checkin. --- .gitignore | 1 + pom.xml | 107 +++++++++--------- .../java/org/nhindirect/common/tx/TxUtil.java | 13 +-- .../common/tx/impl/DefaultTxDetailParser.java | 28 ++--- .../org/nhindirect/common/tx/TestUtils.java | 13 +-- .../tx/TxUtil_getMessageTypeTypeTest.java | 5 +- .../common/tx/TxUtil_isRelAndTimelyTest.java | 7 +- ..._getMessageDetails_OptionalInputsTest.java | 11 +- ...etailParser_getMimeMessageDetailsTest.java | 7 +- .../common/tx/model/TxDetailTest.java | 6 +- .../tx/model/TxDetail_toStringTest.java | 6 +- .../nhindirect/common/tx/model/TxTest.java | 11 +- .../common/tx/model/Tx_toStringTest.java | 6 +- 13 files changed, 109 insertions(+), 112 deletions(-) diff --git a/.gitignore b/.gitignore index 14949e8..39ebe9d 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ hs_err_pid* /.classpath /.project +/target/ diff --git a/pom.xml b/pom.xml index 087b017..fbe5656 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 direct-msg-monitor-model Direct Project Message Monitor Data Model Objects - 6.0.1-SNAPSHOT + 8.0.0-SNAPSHOT Direct Project Message Monitor Data Model Objects 2018 https://github.com/DirectProjectJavaRI/direct-msg-monitor-model @@ -23,38 +23,48 @@ http://nhindirect.org - 3.0.0 + 3.5.0 org.springframework.boot spring-boot-dependencies - 2.1.3.RELEASE - - - scm:git:https://github.com/DirectProjectJavaRI/direct-msg-monitor-model.git - scm:git:https://github.com/DirectProjectJavaRI/direct-msg-monitor-model.git - - - + 2.5.2 + + + + scm:git:https://github.com/DirectProjectJavaRI/direct-msg-monitor-model.git + scm:git:https://github.com/DirectProjectJavaRI/direct-msg-monitor-model.git + + + New BSD License http://nhindirect.org/BSDLicense - - + + + + 1.6.2 + 1.6.7 + 2.8.0 + org.nhind direct-common - 6.0.1-SNAPSHOT + 8.0.0-SNAPSHOT - javax.mail - mail - 1.4.3 - + org.projectlombok + lombok + + + com.sun.mail + javax.mail + ${javax-mail.version} + com.sun.mail dsn - 1.4.3 + ${dsn.version} org.apache.commons @@ -63,34 +73,31 @@ commons-io commons-io - 2.6 + ${commons-io.version} com.fasterxml.jackson.core jackson-annotations - - junit - junit - test - + + org.junit.jupiter + junit-jupiter-engine + test + org.apache.maven.wagon wagon-webdav-jackrabbit - 3.1.0 org.apache.maven.wagon wagon-ssh-external - 3.1.0 org.apache.maven.wagon wagon-ssh - 3.1.0 @@ -119,6 +126,7 @@ org.apache.maven.plugins maven-jxr-plugin + 3.1.1 org.apache.maven.plugins @@ -151,32 +159,27 @@ - - org.apache.maven.plugins - maven-jar-plugin - - - true - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - test-jar - - - - + + org.apache.maven.plugins + maven-jar-plugin + + + true + + + + + + test-jar + + + + org.apache.maven.plugins maven-javadoc-plugin - 2.9.1 - -Xdoclint:none + -Xdoclint:none UTF-8 UTF-8 true @@ -211,6 +214,7 @@ + 3.0.1 --> @@ -220,14 +224,12 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 2.9 org.apache.maven.plugins maven-javadoc-plugin - 2.9.1 - -Xdoclint:none + -Xdoclint:none UTF-8 UTF-8 true @@ -254,6 +256,7 @@ org.apache.maven.plugins maven-jxr-plugin + 3.1.1 org.codehaus.mojo diff --git a/src/main/java/org/nhindirect/common/tx/TxUtil.java b/src/main/java/org/nhindirect/common/tx/TxUtil.java index ee1e442..b9ddf97 100644 --- a/src/main/java/org/nhindirect/common/tx/TxUtil.java +++ b/src/main/java/org/nhindirect/common/tx/TxUtil.java @@ -29,8 +29,6 @@ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY import javax.mail.internet.MimeMessage; import javax.mail.internet.ParseException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.nhindirect.common.mail.MDNStandard; import org.nhindirect.common.mail.SMIMEStandard; import org.nhindirect.common.mail.dsn.DSNStandard; @@ -40,18 +38,17 @@ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY import org.nhindirect.common.tx.model.TxDetailType; import org.nhindirect.common.tx.model.TxMessageType; +import lombok.extern.slf4j.Slf4j; + /** * Utility class for message monitoring * @author Greg Meyer * @since 1.1 */ +@Slf4j public class TxUtil { - @SuppressWarnings("deprecation") - private static final Log LOGGER = LogFactory.getFactory().getInstance(TxUtil.class); - - /** * Gets the message type based on the content type headers. * @param msg The message to extract the type from. @@ -87,11 +84,11 @@ else if (contentType.match(SMIMEStandard.EncryptedContentMediaType) || ///CLOVER:OFF catch (ParseException e) { - LOGGER.warn("Failed to discern message type.", e); + log.warn("Failed to discern message type.", e); } catch (MessagingException e) { - LOGGER.warn("Failed to discern message type.", e); + log.warn("Failed to discern message type.", e); } return TxMessageType.UNKNOWN; ///CLOVER:ON diff --git a/src/main/java/org/nhindirect/common/tx/impl/DefaultTxDetailParser.java b/src/main/java/org/nhindirect/common/tx/impl/DefaultTxDetailParser.java index d932fd7..aabbb21 100644 --- a/src/main/java/org/nhindirect/common/tx/impl/DefaultTxDetailParser.java +++ b/src/main/java/org/nhindirect/common/tx/impl/DefaultTxDetailParser.java @@ -35,8 +35,6 @@ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY import javax.mail.internet.InternetHeaders; import javax.mail.internet.MimeMessage; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.nhindirect.common.mail.MDNStandard; import org.nhindirect.common.mail.MailStandard; import org.nhindirect.common.mail.MailUtil; @@ -49,15 +47,14 @@ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY import com.sun.mail.dsn.DeliveryStatus; +import lombok.extern.slf4j.Slf4j; + +@Slf4j public class DefaultTxDetailParser implements TxDetailParser -{ - @SuppressWarnings("deprecation") - private static final Log LOGGER = LogFactory.getFactory().getInstance(DefaultTxDetailParser.class); - +{ /** * {@inheritDoc} */ - @SuppressWarnings("unchecked") @Override public Map getMessageDetails(InternetHeaders headers) { @@ -78,7 +75,7 @@ public Map getMessageDetails(InternetHeaders headers) catch (MessagingException e) { - LOGGER.warn("Failed to translate headers to MimeMessage.", e); + log.warn("Failed to translate headers to MimeMessage.", e); } ///CLOVER:ON @@ -104,7 +101,7 @@ public Map getMessageDetails(InputStream stream) catch (MessagingException e) { - LOGGER.warn("Failed to translate input stream into MimeMessage.", e); + log.warn("Failed to translate input stream into MimeMessage.", e); } ///CLOVER:ON @@ -158,7 +155,7 @@ public Map getMessageDetails(MimeMessage msg) /// CLOVER:OFF catch (MessagingException e) { - LOGGER.warn("Failed to retrieve message sender list.", e); + log.warn("Failed to retrieve message sender list.", e); } /// CLOVER:ON @@ -173,7 +170,7 @@ public Map getMessageDetails(MimeMessage msg) /// CLOVER:OFF catch (MessagingException e) { - LOGGER.warn("Failed to retrieve message sender", e); + log.warn("Failed to retrieve message sender", e); } /// CLOVER:ON @@ -204,7 +201,7 @@ public Map getMessageDetails(MimeMessage msg) /// CLOVER:OFF catch (MessagingException e) { - LOGGER.warn("Failed to retrieve message recipient list.", e); + log.warn("Failed to retrieve message recipient list.", e); } /// CLOVER:ON @@ -253,7 +250,7 @@ public Map getMessageDetails(MimeMessage msg) // CLOVER:OFF catch (Exception e) { - LOGGER.warn("Failed to retrieve MDN headers from message. Message may not be an MDN message.", e); + log.warn("Failed to retrieve MDN headers from message. Message may not be an MDN message.", e); } // CLOVER:ON break; @@ -300,7 +297,7 @@ public Map getMessageDetails(MimeMessage msg) ///CLOVER:OFF catch (Exception e) { - LOGGER.warn("Could not get a requested field from the DSN message", e); + log.warn("Could not get a requested field from the DSN message", e); } ///CLOVER:ON break; @@ -322,7 +319,6 @@ protected String getHeadersAsStringInternal(MimeMessage msg) return getHeadersAsString(msg); } - @SuppressWarnings("unchecked") public static String getHeadersAsString(MimeMessage msg) { StringBuilder builder = new StringBuilder(); @@ -338,7 +334,7 @@ public static String getHeadersAsString(MimeMessage msg) { // According to most SE runtimes, getAllHeaderLines will never thrown a MessagingException - LOGGER.warn("Failed to builder message summary.", e); + log.warn("Failed to builder message summary.", e); } ///CLOVER:ON diff --git a/src/test/java/org/nhindirect/common/tx/TestUtils.java b/src/test/java/org/nhindirect/common/tx/TestUtils.java index c59c839..8d0fd17 100644 --- a/src/test/java/org/nhindirect/common/tx/TestUtils.java +++ b/src/test/java/org/nhindirect/common/tx/TestUtils.java @@ -2,6 +2,7 @@ import java.io.File; import java.io.InputStream; +import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; @@ -16,25 +17,19 @@ public class TestUtils { - @SuppressWarnings("deprecation") public static String readMessageFromFile(String fileName) throws Exception { - return FileUtils.readFileToString(new File("./src/test/resources/messages/" + fileName)); - + return FileUtils.readFileToString(new File("./src/test/resources/messages/" + fileName), StandardCharsets.UTF_8); } - @SuppressWarnings("deprecation") public static MimeMessage readMimeMessageFromFile(String fileName) throws Exception - { - InputStream str = IOUtils.toInputStream(readMessageFromFile(fileName)); - - try + { + try (InputStream str = IOUtils.toInputStream(readMessageFromFile(fileName), StandardCharsets.UTF_8);) { return new MimeMessage(null, str); } finally { - IOUtils.closeQuietly(str); } } diff --git a/src/test/java/org/nhindirect/common/tx/TxUtil_getMessageTypeTypeTest.java b/src/test/java/org/nhindirect/common/tx/TxUtil_getMessageTypeTypeTest.java index 9e8a8eb..bd47f70 100644 --- a/src/test/java/org/nhindirect/common/tx/TxUtil_getMessageTypeTypeTest.java +++ b/src/test/java/org/nhindirect/common/tx/TxUtil_getMessageTypeTypeTest.java @@ -1,10 +1,11 @@ package org.nhindirect.common.tx; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; import javax.mail.internet.MimeMessage; -import org.junit.Test; import org.nhindirect.common.tx.model.TxMessageType; public class TxUtil_getMessageTypeTypeTest diff --git a/src/test/java/org/nhindirect/common/tx/TxUtil_isRelAndTimelyTest.java b/src/test/java/org/nhindirect/common/tx/TxUtil_isRelAndTimelyTest.java index c9613cc..94e30e9 100644 --- a/src/test/java/org/nhindirect/common/tx/TxUtil_isRelAndTimelyTest.java +++ b/src/test/java/org/nhindirect/common/tx/TxUtil_isRelAndTimelyTest.java @@ -1,14 +1,15 @@ package org.nhindirect.common.tx; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import org.junit.jupiter.api.Test; import java.util.HashMap; import java.util.Map; import javax.mail.internet.MimeMessage; -import org.junit.Test; import org.nhindirect.common.mail.MDNStandard; import org.nhindirect.common.tx.model.Tx; import org.nhindirect.common.tx.model.TxDetail; diff --git a/src/test/java/org/nhindirect/common/tx/impl/DefaultTxDetailParser_getMessageDetails_OptionalInputsTest.java b/src/test/java/org/nhindirect/common/tx/impl/DefaultTxDetailParser_getMessageDetails_OptionalInputsTest.java index 585e56b..a5b0649 100644 --- a/src/test/java/org/nhindirect/common/tx/impl/DefaultTxDetailParser_getMessageDetails_OptionalInputsTest.java +++ b/src/test/java/org/nhindirect/common/tx/impl/DefaultTxDetailParser_getMessageDetails_OptionalInputsTest.java @@ -1,8 +1,10 @@ package org.nhindirect.common.tx.impl; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import org.junit.jupiter.api.Test; import java.io.InputStream; import java.util.Locale; @@ -12,7 +14,6 @@ import javax.mail.internet.MimeMessage; import org.apache.commons.io.IOUtils; -import org.junit.Test; import org.nhindirect.common.mail.MailStandard; import org.nhindirect.common.tx.TestUtils; import org.nhindirect.common.tx.model.TxDetail; @@ -164,7 +165,7 @@ public void testGetMessageDetails_getReportExtension_noDispostionOption() throws final Map details = parser.getMessageDetails(msg); - assertNull("X-DIRECT-FINAL-DESTINATION-DELIVERY", details.get(TxDetailType.DISPOSITION_OPTIONS.getType())); + assertNull(details.get(TxDetailType.DISPOSITION_OPTIONS.getType())); } } diff --git a/src/test/java/org/nhindirect/common/tx/impl/DefaultTxDetailParser_getMimeMessageDetailsTest.java b/src/test/java/org/nhindirect/common/tx/impl/DefaultTxDetailParser_getMimeMessageDetailsTest.java index 27a4d67..b3a901e 100644 --- a/src/test/java/org/nhindirect/common/tx/impl/DefaultTxDetailParser_getMimeMessageDetailsTest.java +++ b/src/test/java/org/nhindirect/common/tx/impl/DefaultTxDetailParser_getMimeMessageDetailsTest.java @@ -1,14 +1,15 @@ package org.nhindirect.common.tx.impl; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +import org.junit.jupiter.api.Test; import java.util.Locale; import java.util.Map; import javax.mail.internet.MimeMessage; -import org.junit.Test; import org.nhindirect.common.mail.MDNStandard; import org.nhindirect.common.mail.MailStandard; import org.nhindirect.common.tx.TestUtils; diff --git a/src/test/java/org/nhindirect/common/tx/model/TxDetailTest.java b/src/test/java/org/nhindirect/common/tx/model/TxDetailTest.java index 7af40be..f8628bf 100644 --- a/src/test/java/org/nhindirect/common/tx/model/TxDetailTest.java +++ b/src/test/java/org/nhindirect/common/tx/model/TxDetailTest.java @@ -1,9 +1,9 @@ package org.nhindirect.common.tx.model; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class TxDetailTest { diff --git a/src/test/java/org/nhindirect/common/tx/model/TxDetail_toStringTest.java b/src/test/java/org/nhindirect/common/tx/model/TxDetail_toStringTest.java index 4cfa9d3..0627291 100644 --- a/src/test/java/org/nhindirect/common/tx/model/TxDetail_toStringTest.java +++ b/src/test/java/org/nhindirect/common/tx/model/TxDetail_toStringTest.java @@ -1,9 +1,9 @@ package org.nhindirect.common.tx.model; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class TxDetail_toStringTest { diff --git a/src/test/java/org/nhindirect/common/tx/model/TxTest.java b/src/test/java/org/nhindirect/common/tx/model/TxTest.java index b9d1f49..6bad472 100644 --- a/src/test/java/org/nhindirect/common/tx/model/TxTest.java +++ b/src/test/java/org/nhindirect/common/tx/model/TxTest.java @@ -1,14 +1,15 @@ package org.nhindirect.common.tx.model; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import org.junit.jupiter.api.Test; import java.util.HashMap; import java.util.Map; -import org.junit.Test; public class TxTest { diff --git a/src/test/java/org/nhindirect/common/tx/model/Tx_toStringTest.java b/src/test/java/org/nhindirect/common/tx/model/Tx_toStringTest.java index 1adf1e5..12897a1 100644 --- a/src/test/java/org/nhindirect/common/tx/model/Tx_toStringTest.java +++ b/src/test/java/org/nhindirect/common/tx/model/Tx_toStringTest.java @@ -1,11 +1,11 @@ package org.nhindirect.common.tx.model; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import org.junit.jupiter.api.Test; import java.util.HashMap; import java.util.Map; -import org.junit.Test; - public class Tx_toStringTest { @Test From 8ec591d739833c7d79b9cabafed39ea5e6cb156b Mon Sep 17 00:00:00 2001 From: gm2552 Date: Tue, 3 Aug 2021 09:29:12 -0500 Subject: [PATCH 5/5] Releasing 8.0.0 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index fbe5656..7335a66 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 direct-msg-monitor-model Direct Project Message Monitor Data Model Objects - 8.0.0-SNAPSHOT + 8.0.0 Direct Project Message Monitor Data Model Objects 2018 https://github.com/DirectProjectJavaRI/direct-msg-monitor-model @@ -50,7 +50,7 @@ org.nhind direct-common - 8.0.0-SNAPSHOT + 8.0.0 org.projectlombok