Skip to content

CheckFields: compose repeated mandatory and optional properties - #788

Merged
ar merged 2 commits into
mainfrom
fix/checkfields-repeated-properties
Oct 8, 2026
Merged

ar merged 2 commits into
mainfrom
fix/checkfields-repeated-properties

Conversation

@ar-agt

@ar-agt ar-agt commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes #787.

  • Read all mandatory and optional property values with Configuration.getAll() and join each list in declaration order.
  • Preserve absent/single-property behavior and existing field validation, including rejection of undeclared extra fields.
  • Document repeated declarations in the class Javadoc.
  • Add regression coverage using SimpleConfigurationFactory with repeated XML properties: optional fields from both lists (including overlap), mandatory fields from the second list, and empty repeated values.

Repeated declarations now take effect rather than being silently ignored. In particular, fields in a second mandatory declaration become required.

Verification

  • Before the fix: all 19 existing CheckFields tests passed; all 3 new regressions failed.
  • After the fix: 85 tests passed across CheckFieldsTest (22), SimpleConfigurationTest (57), and SimpleConfigurationFactoryTest (6).
  • :jpos:javadoc passed with 8 warnings in unchanged code.
  • git diff --check passed.
  • Used the repository SDKMAN toolchain: Java 26.0.2-amzn and Gradle 9.7.1.
  • Full repository test suite and end-to-end XInclude descriptor loading were not run; XML property aggregation is exercised through SimpleConfigurationFactory.

Command:

./gradlew :jpos:test --tests org.jpos.transaction.participant.CheckFieldsTest --tests org.jpos.core.SimpleConfigurationTest --tests org.jpos.q2.SimpleConfigurationFactoryTest :jpos:javadoc --console=plain

@ar
ar merged commit 5783441 into main Oct 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CheckFields: join repeated mandatory/optional properties so field lists can be composed

2 participants