nzw921rx opened a new pull request, #11121: URL: https://github.com/apache/seatunnel/pull/11121
### Purpose of this pull request Related: https://github.com/apache/seatunnel/issues/11007 Fix `ConfigValidator.collectErrors()` breaking its error-aggregation contract when validating `SingleChoiceOption` — previously `validateSingleChoice()` threw `OptionValidationException` directly, aborting collection of remaining errors. Also clarify the `ConditionExtension` javadoc on throw vs return-false semantics. **Changes**: - `ConfigValidator.validateSingleChoice()` — replace `throw OptionValidationException` with `errors.add()`, accepting a `List<String> errors` parameter so single-choice violations participate in error aggregation - `ConfigValidator.collectErrors()` — pass `errors` list into `validateSingleChoice()` calls for both required and optional options - `ConditionExtension` javadoc — clarify that `return false` keeps aggregation, `throw` is fail-fast; recommend `return false` when possible - `ConfigValidatorTest` — update existing single-choice assertions to match new error format; add `testMultipleSingleChoiceErrorsCollected` and `testMixedErrorTypesAllCollected` to verify aggregation contract ### Does this PR introduce _any_ user-facing change? - multiple config errors are now reported together instead of stopping at the first single-choice violation. ### How was this patch tested? ```bash ./mvnw test -pl seatunnel-api -Dtest="ConfigValidatorTest" -DfailIfNoTests=false -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
