Files
floci/src/test/java
Priamo Germosen 3641a074dc fix(cloudfront): dedupe CacheBehavior XML parsing (#3705)
DefaultCacheBehavior and CacheBehavior each had their own ~250-line
hand-written XML-parsing state machine for the same element shape,
found via a CPD pass (#3652). Extracted the shared logic into one
parseCacheBehaviorScope helper, used by both parsing call sites, with
a small CacheBehaviorSettings interface so the helper can populate
either model type.

The duplication had already caused the exact bug it risked: the
CacheBehavior copy never parsed RealtimeLogConfigArn, even though the
field exists on both types in AWS's real CloudFront wire model and on
the CacheBehavior model class itself. The response XML builders for
both types also never emitted it. Fixed both and added a regression
test.
2026-09-15 22:30:49 -04:00
..