fix(elbv2): reject missing listeners in describe requests (#7152)

Promote the complete retained fork #235 listener lookup validation and affected SDK and CloudFormation regressions on the qualified main base. Preserve the original compatibility fixture and JUnit SDK adapter.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
This commit is contained in:
Andre Kurait authored and GitHub committed 2026-10-31 20:15:05 -04:00
1 parent 8f5548687f
commit faa9ff2365
7 files changed
+255 -3

No files matched your search

@@ -684,12 +684,16 @@ public class ElbV2Service implements ResourceProvider, ServerCertificateReferenc
List<Listener> result = new ArrayList<>(regionListeners.values());
if (lbArn != null && !lbArn.isEmpty()) {
requireLoadBalancer(region, lbArn);
result = result.stream()
.filter(l -> l.getLoadBalancerArn().equals(lbArn))
.collect(Collectors.toList());
}
if (listenerArns != null && !listenerArns.isEmpty()) {
Set<String> arnSet = new HashSet<>(listenerArns);
for (String arn : arnSet) {
requireListener(region, arn);
}
result = result.stream().filter(l -> arnSet.contains(l.getListenerArn())).collect(Collectors.toList());
}
return result;