• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ExpediaGroup / bull / #1406
100%

Build:
DEFAULT BRANCH: master
Ran 31 Mar 2026 09:04AM UTC
Jobs 1
Files 60
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

31 Mar 2026 09:03AM UTC coverage: 100.0%. Remained the same
#1406

push

web-flow
Fix/collection element field transformer null regression (#654)

* fix: prevent NPE when field transformer is applied to collection elements with flat field name mapping

When a CollectionPopulator transforms list elements (e.g. List<PersonSvc> -> List<Person>),
it calls transformer.transform(elem, targetClass) without a breadcrumb. In resolveEffectiveSource,
evalBreadcrumb("fieldName", null) returns just "fieldName", which could match a simple flat
field mapping (e.g. "name" -> "fullName"). This caused the lookup to incorrectly redirect to
the root source object instead of the current element, and getSourceFieldValue silently returned
null (swallowing the MissingFieldException because a transformer was defined), ultimately
passing null into the user's transformer function and triggering a NullPointerException.

Fix: guard the breadcrumb-based mapping lookup with isNotEmpty(breadcrumb) so root-source
redirection only occurs when there is an actual breadcrumb prefix in the path.

* test: add regression tests for collection element field transformer NPE

Add tests verifying that field transformers using flat field name transformation
correctly use the collection element as the source, not the root object.

New sample classes:
- FromFooWithFullName: source item with a fullName field
- FromFooContainingList: root source with id + List<FromFooWithFullName>
- ImmutableToFooWithSplitName: target item with name + surname fields
- ImmutableToFooContainingList: root target with id + List<ImmutableToFooWithSplitName>

New tests in MixedObjectTransformationTest:
- testFieldTransformerOnCollectionElementsUsesElementNotRootAsSource: verifies
  that withFieldMapping + withFieldTransformer on collection elements reads from
  the element, not the root (would have NPEd before the fix)
- testAllCollectionElementsAreIndependentlyTransformedFromTheirOwnSource: verifies
  each element is transformed from its own source independently

Also adds resetFieldsMapping() to Abstr... (continued)

4 of 4 new or added lines in 1 file covered. (100.0%)

1225 of 1225 relevant lines covered (100.0%)

1.95 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #1406.1 31 Mar 2026 09:04AM UTC 60
100.0
Source Files on build #1406
  • Tree
  • List 60
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 65195020 on github
  • Prev Build on develop
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc