refactor(emr-serverless): word the states filter's length refusal through the shared helper (#8192)

EMR Serverless spelled out the framework's "Value '...' at 'states'
failed to satisfy constraint" sentence for a states filter longer than
its set allows. It now goes through SmithyValidationErrors.Violations'
quoted form, as its other violations do, and answers the same message.

A double blank line #6439 left in EmrServerlessJobRunService goes too.
This commit is contained in:
Priamo Germosen authored and GitHub committed 2026-11-13 07:34:14 -04:00
1 parent f5fd41a6ac
commit 4963472362
2 files changed
+2 -3

No files matched your search

@@ -1182,7 +1182,6 @@ public class EmrServerlessJobRunService implements Resettable {
return limits;
}
/**
* From Amazon EMR release 7.11.0 a BATCH run's timeout is 1 to 10080 minutes; an earlier release, or
* a STREAMING run, keeps the model's 0 to 1,000,000, 0 meaning none. No source gives AWS's error, so
@@ -428,8 +428,8 @@ public class EmrServerlessService {
return violations;
}
if (states.size() > max) {
violations.add("Value '" + states + "' at 'states' failed to satisfy constraint: "
+ "Member must have length less than or equal to " + max);
violations.add(SmithyValidationErrors.Violations.QUOTED.constraint("states", states.toString(),
"Member must have length less than or equal to " + max));
}
if (!allowed.containsAll(states)) {
violations.add(SmithyValidationErrors.notAllInEnum(states, "states", allowed));