From 278656285b19b3efdcec2ddc2c39e4317e5320fc Mon Sep 17 00:00:00 2001 From: Russsnizza <134000942+Russsnizza@users.noreply.github.com> Date: Fri, 27 Sep 2024 11:31:57 -0600 Subject: [PATCH] Use non-lamba builder --- .../rds/DbClusterParameterGroupResource.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/main/java/gyro/aws/rds/DbClusterParameterGroupResource.java b/src/main/java/gyro/aws/rds/DbClusterParameterGroupResource.java index 419c5d3ca..937387ac2 100644 --- a/src/main/java/gyro/aws/rds/DbClusterParameterGroupResource.java +++ b/src/main/java/gyro/aws/rds/DbClusterParameterGroupResource.java @@ -33,6 +33,8 @@ import software.amazon.awssdk.services.rds.model.DescribeDbClusterParameterGroupsResponse; import software.amazon.awssdk.services.rds.model.DescribeDbClusterParametersResponse; import software.amazon.awssdk.services.rds.model.Parameter; +import software.amazon.awssdk.services.rds.model.DescribeDbClusterParameterGroupsRequest; +import software.amazon.awssdk.services.rds.model.DescribeDbClusterParametersRequest; import java.util.ArrayList; import java.util.List; @@ -145,17 +147,22 @@ protected boolean doRefresh() { } try { DescribeDbClusterParameterGroupsResponse response = client.describeDBClusterParameterGroups( - r -> r.dbClusterParameterGroupName(getName()) + DescribeDbClusterParameterGroupsRequest.builder() + .dbClusterParameterGroupName(getName()) + .build() ); response.dbClusterParameterGroups().forEach(this::copyFrom); Set names = getParameter().stream().map(DbParameter::getName).collect(Collectors.toSet()); getParameter().clear(); - String[] marker = {null}; + String marker = null; do { DescribeDbClusterParametersResponse parametersResponse = client.describeDBClusterParameters( - r -> r.dbClusterParameterGroupName(getName()).marker(marker[0]) + DescribeDbClusterParametersRequest.builder() + .dbClusterParameterGroupName(getName()) + .marker(marker) + .build() ); getParameter().addAll(parametersResponse.parameters().stream() @@ -170,8 +177,8 @@ protected boolean doRefresh() { .collect(Collectors.toList()) ); - marker[0] = parametersResponse.marker(); - } while (marker[0] != null); + marker = parametersResponse.marker(); + } while (marker != null); } catch (DbParameterGroupNotFoundException ex) { return false; }