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

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

commit c04f587fb7ec52b72785d048ce87c7a280361725
Author: exceptionfactory <exceptionfact...@apache.org>
AuthorDate: Thu Sep 14 14:16:31 2023 -0500

    NIFI-12037 Changed List.of to Collections.singletonList for Java 8
    
    Signed-off-by: David Handermann <exceptionfact...@apache.org>
---
 .../apache/nifi/authorization/azure/AzureGraphUserGroupProvider.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-graph-authorizer/src/main/java/org/apache/nifi/authorization/azure/AzureGraphUserGroupProvider.java
 
b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-graph-authorizer/src/main/java/org/apache/nifi/authorization/azure/AzureGraphUserGroupProvider.java
index 0bffadd35f..62ae451b9f 100644
--- 
a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-graph-authorizer/src/main/java/org/apache/nifi/authorization/azure/AzureGraphUserGroupProvider.java
+++ 
b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-graph-authorizer/src/main/java/org/apache/nifi/authorization/azure/AzureGraphUserGroupProvider.java
@@ -297,7 +297,7 @@ public class AzureGraphUserGroupProvider implements 
UserGroupProvider {
         IGroupCollectionPage filterResults;
         if (prefix != null && !prefix.isEmpty()) {
             // build a $filter query option and create a graph request if 
prefix is given
-            final List<Option> requestOptions = List.of(new 
QueryOption("$filter", String.format("startswith(displayName, '%s')", prefix)));
+            final List<Option> requestOptions = Collections.singletonList(new 
QueryOption("$filter", String.format("startswith(displayName, '%s')", prefix)));
             gRequest = 
graphClient.groups().buildRequest(requestOptions).select("displayName");
         } else {
             // default group graph request
@@ -342,7 +342,7 @@ public class AzureGraphUserGroupProvider implements 
UserGroupProvider {
     private UserGroupQueryResult getUsersFrom(String groupName, int pageSize) 
throws IOException, ClientException {
         final Set<User> users = new HashSet<>();
 
-        final List<Option> requestOptions = List.of(new QueryOption("$filter", 
String.format("displayName eq '%s'", groupName)));
+        final List<Option> requestOptions = Collections.singletonList(new 
QueryOption("$filter", String.format("displayName eq '%s'", groupName)));
         final IGroupCollectionPage results = 
graphClient.groups().buildRequest(requestOptions).get();
         final List<com.microsoft.graph.models.extensions.Group> currentPage = 
results.getCurrentPage();
 

Reply via email to