This is an automated email from the ASF dual-hosted git repository.
mthomsen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new 977800b NIFI-9210 Upgraded jsoup from 1.8.3 to 1.14.2
977800b is described below
commit 977800b8350d396ba2319a3c54d2ce10812f5584
Author: exceptionfactory <[email protected]>
AuthorDate: Thu Sep 9 16:05:12 2021 -0500
NIFI-9210 Upgraded jsoup from 1.8.3 to 1.14.2
This closes #5379
Signed-off-by: Mike Thomsen <[email protected]>
---
minifi/pom.xml | 2 +-
nifi-nar-bundles/nifi-html-bundle/nifi-html-processors/pom.xml | 2 +-
.../src/test/java/org/apache/nifi/TestPutHTMLElement.java | 10 ++++++----
nifi-nar-bundles/nifi-media-bundle/pom.xml | 6 ++++++
4 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/minifi/pom.xml b/minifi/pom.xml
index e28972e..f57d783 100644
--- a/minifi/pom.xml
+++ b/minifi/pom.xml
@@ -1028,7 +1028,7 @@ limitations under the License.
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
- <version>1.8.3</version>
+ <version>1.14.2</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
diff --git a/nifi-nar-bundles/nifi-html-bundle/nifi-html-processors/pom.xml
b/nifi-nar-bundles/nifi-html-bundle/nifi-html-processors/pom.xml
index e8662b7..8b5563b 100644
--- a/nifi-nar-bundles/nifi-html-bundle/nifi-html-processors/pom.xml
+++ b/nifi-nar-bundles/nifi-html-bundle/nifi-html-processors/pom.xml
@@ -29,7 +29,7 @@
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
- <version>1.8.3</version>
+ <version>1.14.2</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
diff --git
a/nifi-nar-bundles/nifi-html-bundle/nifi-html-processors/src/test/java/org/apache/nifi/TestPutHTMLElement.java
b/nifi-nar-bundles/nifi-html-bundle/nifi-html-processors/src/test/java/org/apache/nifi/TestPutHTMLElement.java
index b842ccb..5d4c5e5 100644
---
a/nifi-nar-bundles/nifi-html-bundle/nifi-html-processors/src/test/java/org/apache/nifi/TestPutHTMLElement.java
+++
b/nifi-nar-bundles/nifi-html-bundle/nifi-html-processors/src/test/java/org/apache/nifi/TestPutHTMLElement.java
@@ -29,6 +29,8 @@ import org.junit.Test;
import java.io.File;
import java.util.List;
+
+import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -58,7 +60,7 @@ public class TestPutHTMLElement extends AbstractHTMLTest {
testRunner.assertTransferCount(PutHTMLElement.REL_NOT_FOUND, 0);
List<MockFlowFile> ffs =
testRunner.getFlowFilesForRelationship(PutHTMLElement.REL_SUCCESS);
- assertTrue(ffs.size() == 1);
+ assertEquals(1, ffs.size());
String data = new String(testRunner.getContentAsByteArray(ffs.get(0)));
//Contents will be the entire HTML doc. So lets use Jsoup again just
the grab the element we want.
@@ -85,7 +87,7 @@ public class TestPutHTMLElement extends AbstractHTMLTest {
testRunner.assertTransferCount(PutHTMLElement.REL_NOT_FOUND, 0);
List<MockFlowFile> ffs =
testRunner.getFlowFilesForRelationship(PutHTMLElement.REL_SUCCESS);
- assertTrue(ffs.size() == 1);
+ assertEquals(1, ffs.size());
String data = new String(testRunner.getContentAsByteArray(ffs.get(0)));
//Contents will be the entire HTML doc. So lets use Jsoup again just
the grab the element we want.
@@ -93,7 +95,7 @@ public class TestPutHTMLElement extends AbstractHTMLTest {
Elements eles = doc.select("#put");
Element ele = eles.get(0);
- assertTrue(StringUtils.equals("<p>modified value</p> \n<a
href=\"httpd://localhost\"></a>", ele.html()));
+ assertEquals("<p>modified value</p><a
href=\"httpd://localhost\"></a>", ele.html());
}
@Test
@@ -112,7 +114,7 @@ public class TestPutHTMLElement extends AbstractHTMLTest {
testRunner.assertTransferCount(PutHTMLElement.REL_NOT_FOUND, 0);
List<MockFlowFile> ffs =
testRunner.getFlowFilesForRelationship(PutHTMLElement.REL_SUCCESS);
- assertTrue(ffs.size() == 1);
+ assertEquals(1, ffs.size());
String data = new String(testRunner.getContentAsByteArray(ffs.get(0)));
//Contents will be the entire HTML doc. So lets use Jsoup again just
the grab the element we want.
diff --git a/nifi-nar-bundles/nifi-media-bundle/pom.xml
b/nifi-nar-bundles/nifi-media-bundle/pom.xml
index 1aa2bde..efe1de1 100644
--- a/nifi-nar-bundles/nifi-media-bundle/pom.xml
+++ b/nifi-nar-bundles/nifi-media-bundle/pom.xml
@@ -40,6 +40,12 @@
<artifactId>commons-compress</artifactId>
<version>1.21</version>
</dependency>
+ <!-- Override version from tika-parsers -->
+ <dependency>
+ <groupId>org.jsoup</groupId>
+ <artifactId>jsoup</artifactId>
+ <version>1.14.2</version>
+ </dependency>
</dependencies>
</dependencyManagement>
</project>