diff --git a/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/pom.xml b/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/pom.xml
index bfb6b09734..3b5d3861c5 100644
--- a/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/pom.xml
+++ b/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/pom.xml
@@ -99,15 +99,10 @@
-
- commons-logging
- commons-logging
- 1.2
-
org.apache.poi
poi-scratchpad
- 4.0.1
+ 5.0.0
org.apache.nifi
diff --git a/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestExtractTNEFAttachments.java b/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestExtractTNEFAttachments.java
index 57ace41821..6438d98267 100644
--- a/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestExtractTNEFAttachments.java
+++ b/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestExtractTNEFAttachments.java
@@ -27,8 +27,6 @@ import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import java.util.Random;
-
public class TestExtractTNEFAttachments {
@@ -36,7 +34,6 @@ public class TestExtractTNEFAttachments {
public void testValidTNEFWithoutAttachment() throws Exception {
final TestRunner runner = TestRunners.newTestRunner(new ExtractTNEFAttachments());
-
runner.enqueue(Paths.get("src/test/resources/winmail-simple.dat"));
runner.run();
@@ -45,12 +42,11 @@ public class TestExtractTNEFAttachments {
runner.assertTransferCount(ExtractEmailAttachments.REL_ATTACHMENTS, 0);
// Have a look at the attachments...
final List splits = runner.getFlowFilesForRelationship(ExtractEmailAttachments.REL_ATTACHMENTS);
- Assert.assertTrue(splits.size() == 0);
+ Assert.assertEquals(0, splits.size());
}
@Test
public void testValidTNEFWithMultipleAttachments() throws Exception {
- Random rnd = new Random() ;
final TestRunner runner = TestRunners.newTestRunner(new ExtractTNEFAttachments());
runner.enqueue(Paths.get("src/test/resources/winmail-with-attachments.dat"));
@@ -63,8 +59,8 @@ public class TestExtractTNEFAttachments {
final List splits = runner.getFlowFilesForRelationship(ExtractTNEFAttachments.REL_ATTACHMENTS);
List filenames = new ArrayList<>();
- for (int a = 0 ; a < splits.size() ; a++ ) {
- filenames.add(splits.get(a).getAttribute("filename").toString());
+ for (final MockFlowFile flowFile : splits) {
+ filenames.add(flowFile.getAttribute("filename"));
}
Assert.assertTrue(filenames.containsAll(Arrays.asList("nifiDrop.svg", "MINIFI~1.PNG")));
@@ -72,7 +68,6 @@ public class TestExtractTNEFAttachments {
@Test
public void testValidTNEFWithAttachment() throws Exception {
- Random rnd = new Random() ;
final TestRunner runner = TestRunners.newTestRunner(new ExtractTNEFAttachments());
runner.enqueue(Paths.get("src/test/resources/winmail-with-attachment.dat"));
@@ -85,15 +80,15 @@ public class TestExtractTNEFAttachments {
final List splits = runner.getFlowFilesForRelationship(ExtractTNEFAttachments.REL_ATTACHMENTS);
List filenames = new ArrayList<>();
- for (int a = 0 ; a < splits.size() ; a++ ) {
- filenames.add(splits.get(a).getAttribute("filename").toString());
+ for (final MockFlowFile flowFile : splits) {
+ filenames.add(flowFile.getAttribute("filename"));
}
- Assert.assertTrue(filenames.containsAll(Arrays.asList("nifiDrop.svg")));
+ Assert.assertTrue(filenames.contains("nifiDrop.svg"));
}
@Test
- public void testInvalidTNEF() throws Exception {
+ public void testInvalidTNEF() {
final TestRunner runner = TestRunners.newTestRunner(new ExtractTNEFAttachments());
runner.enqueue("test test test chocolate".getBytes());
runner.run();
diff --git a/nifi-nar-bundles/nifi-poi-bundle/nifi-poi-processors/pom.xml b/nifi-nar-bundles/nifi-poi-bundle/nifi-poi-processors/pom.xml
index 17feaf2f68..2e5a960759 100644
--- a/nifi-nar-bundles/nifi-poi-bundle/nifi-poi-processors/pom.xml
+++ b/nifi-nar-bundles/nifi-poi-bundle/nifi-poi-processors/pom.xml
@@ -17,7 +17,7 @@
4.0.0
- 4.0.1
+ 5.0.0