NIFI-9210 Upgraded jsoup from 1.8.3 to 1.14.2

This closes #5379

Signed-off-by: Mike Thomsen <mthomsen@apache.org>
This commit is contained in:
exceptionfactory 2021-09-09 16:05:12 -05:00 committed by Mike Thomsen
parent d96398feb8
commit 977800b835
No known key found for this signature in database
GPG Key ID: 88511C3D4CAD246F
4 changed files with 14 additions and 6 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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.

View File

@ -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>