You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
此內容由 AI 產生(specification-mapper 全庫審查 2026-07-16.執行圖)。
Work package WP10 · findings: TEST-03 · worst severity: medium · effort: S
From the 2026-07-16 whole-codebase review of branch jakarta (snapshot 7de4a33; modules mapper/ + starter/). Every finding below is CONFIRMED by independent adversarial verification. File:line coordinates are from the snapshot and may have drifted.
Trimmed since the review. The review's WP10 also carried TEST-05 (nested-AND typo) and TEST-06 (single-threaded concurrency test); both were fixed post-review by PR #187 (verified on jakarta HEAD). Only TEST-03 survives, so this package is reduced to it.
Findings
TEST-03 — Inherited fields of criteria POJOs are silently ignored (doWithLocalFields) and no test pins this contract (testing, medium)
Evidence (re-confirmed on jakarta HEAD): newFieldLookup uses ReflectionUtils.doWithLocalFields(target.getClass(), …), which visits only fields declared on the concrete class — fields inherited from a superclass criteria POJO are never databound. No test in ReflectionDatabindTest exercises a subclass criteria POJO, so the contract (intended or not) is unpinned.
Plan
Add a test with a criteria POJO that extends a base criteria class carrying an annotated field, asserting the current behavior: the inherited field is not databound (i.e. pin doWithLocalFields' local-only contract) — so any future switch to doWithFields becomes a deliberate, test-visible decision.
Add a short Javadoc note on newFieldLookup stating the local-fields-only contract, so the limitation is discoverable at the source.
Scope note: this pins the current behavior. Whether inherited fields should be databound is a separate behavior-change decision left to the maintainer; this package does not make that change.
Acceptance criteria
A new ReflectionDatabindTest case pins the inherited-field behavior and passes.
Activity