This is an automated email from the ASF dual-hosted git repository.

joewitt pushed a commit to branch support/nifi-1.15
in repository https://gitbox.apache.org/repos/asf/nifi.git

commit 95159ebe4823e401aad57b2669f50be798a47d38
Author: exceptionfactory <exceptionfact...@apache.org>
AuthorDate: Mon Nov 29 11:51:47 2021 -0600

    NIFI-9420 Upgraded MiNiFi Guava from 26.0 to 31.0.1
    
    - Replaced usage of Guava Lists with standard Java classes in 
TemplatesIteratorTest
    
    Signed-off-by: Matthew Burgess <mattyb...@apache.org>
    
    This closes #5556
---
 .../c2/provider/nifi/rest/TemplatesIteratorTest.java       | 14 +++++++-------
 minifi/pom.xml                                             |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git 
a/minifi/minifi-c2/minifi-c2-provider/minifi-c2-provider-nifi-rest/src/test/java/org/apache/nifi/minifi/c2/provider/nifi/rest/TemplatesIteratorTest.java
 
b/minifi/minifi-c2/minifi-c2-provider/minifi-c2-provider-nifi-rest/src/test/java/org/apache/nifi/minifi/c2/provider/nifi/rest/TemplatesIteratorTest.java
index c8e19b2..3e2fe9d 100644
--- 
a/minifi/minifi-c2/minifi-c2-provider/minifi-c2-provider-nifi-rest/src/test/java/org/apache/nifi/minifi/c2/provider/nifi/rest/TemplatesIteratorTest.java
+++ 
b/minifi/minifi-c2/minifi-c2-provider/minifi-c2-provider-nifi-rest/src/test/java/org/apache/nifi/minifi/c2/provider/nifi/rest/TemplatesIteratorTest.java
@@ -18,7 +18,6 @@
 package org.apache.nifi.minifi.c2.provider.nifi.rest;
 
 import com.fasterxml.jackson.core.JsonFactory;
-import com.google.common.collect.Lists;
 import org.apache.nifi.minifi.c2.api.ConfigurationProviderException;
 import org.apache.nifi.minifi.c2.api.util.Pair;
 import org.apache.nifi.minifi.c2.provider.util.HttpConnector;
@@ -27,6 +26,7 @@ import org.junit.Test;
 
 import java.io.IOException;
 import java.net.HttpURLConnection;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.NoSuchElementException;
 
@@ -64,9 +64,9 @@ public class TemplatesIteratorTest {
     @Test
     public void testIteratorNoTemplates() throws 
ConfigurationProviderException, IOException {
         
when(httpURLConnection.getInputStream()).thenReturn(TemplatesIteratorTest.class.getClassLoader().getResourceAsStream("noTemplates.json"));
-        List<Pair<String, String>> idToNameList;
+        List<Pair<String, String>> idToNameList = new ArrayList<>();
         try (TemplatesIterator templatesIterator = new 
TemplatesIterator(httpConnector, jsonFactory)) {
-            idToNameList = Lists.newArrayList(templatesIterator);
+            templatesIterator.forEachRemaining(idToNameList::add);
         }
         assertEquals(0, idToNameList.size());
 
@@ -76,9 +76,9 @@ public class TemplatesIteratorTest {
     @Test
     public void testIteratorSingleTemplate() throws 
ConfigurationProviderException, IOException {
         
when(httpURLConnection.getInputStream()).thenReturn(TemplatesIteratorTest.class.getClassLoader().getResourceAsStream("oneTemplate.json"));
-        List<Pair<String, String>> idToNameList;
+        List<Pair<String, String>> idToNameList = new ArrayList<>();
         try (TemplatesIterator templatesIterator = new 
TemplatesIterator(httpConnector, jsonFactory)) {
-            idToNameList = Lists.newArrayList(templatesIterator);
+            templatesIterator.forEachRemaining(idToNameList::add);
         }
         assertEquals(1, idToNameList.size());
         Pair<String, String> idNamePair = idToNameList.get(0);
@@ -91,9 +91,9 @@ public class TemplatesIteratorTest {
     @Test
     public void testIteratorTwoTemplates() throws 
ConfigurationProviderException, IOException {
         
when(httpURLConnection.getInputStream()).thenReturn(TemplatesIteratorTest.class.getClassLoader().getResourceAsStream("twoTemplates.json"));
-        List<Pair<String, String>> idToNameList;
+        List<Pair<String, String>> idToNameList = new ArrayList<>();
         try (TemplatesIterator templatesIterator = new 
TemplatesIterator(httpConnector, jsonFactory)) {
-            idToNameList = Lists.newArrayList(templatesIterator);
+            templatesIterator.forEachRemaining(idToNameList::add);
         }
         assertEquals(2, idToNameList.size());
         Pair<String, String> idNamePair = idToNameList.get(0);
diff --git a/minifi/pom.xml b/minifi/pom.xml
index 0eb96ac..6a6e122 100644
--- a/minifi/pom.xml
+++ b/minifi/pom.xml
@@ -948,7 +948,7 @@ limitations under the License.
             <dependency>
                 <groupId>com.google.guava</groupId>
                 <artifactId>guava</artifactId>
-                <version>26.0-jre</version>
+                <version>31.0.1-jre</version>
             </dependency>
             <dependency>
                 <groupId>com.h2database</groupId>

Reply via email to