docs(iam): describe the list-violation value omission as a choice (#4626)

The javadoc on checkListLength said leaving the value out of a list
constraint violation matched how AWS reports one. That is not established:
captured violations elsewhere in AWS do quote the list, such as Lambda's
"Value '[x86_64, arm64]' at 'architectures'", and IAM's own are
inconsistent about it. The wording generalised the helper's existing
behaviour into a claim about AWS that nothing here verified.

The behaviour is unchanged and deliberate, so the comment now says it is
Floci's choice and gives the actual reason: a request that breaks the
limit should not echo every member back in the error message.

Comments only; the emitted message is byte-identical.
This commit is contained in:
Priamo Germosen authored and GitHub committed 2026-09-28 23:39:09 -05:00
1 parent ac706264a3
commit aeb304d7b4
1 file changed
+5 -2
@@ -2227,8 +2227,11 @@ public class IamQueryHandler {
}
/**
* IAM's constraint-violation shape for a list member. Unlike the scalar form it does not quote
* the value, matching how AWS reports an over-long list rather than echoing every member back.
* The constraint-violation shape used for a list member. Unlike the scalar form it leaves the
* value out, which is Floci's choice rather than a rule AWS follows: captured violations
* elsewhere in AWS do quote the list, such as Lambda's {@code Value '[x86_64, arm64]' at
* 'architectures'}, while IAM's own are inconsistent about it. Omitting it keeps a request that
* breaks the limit from echoing every member back in the error message.
*/
private static void checkListLength(int members, String param, int limit) {
if (members > limit) {