[bug] Deserialize nonempty XML with generic TypeReference #4435
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.31) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.31 · 85 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.00 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.350
Diff Size
diff_size
0.266
Real PR Conversation Timeline
2 items
Approved
Approved these changes.
Duansg
hutiefang76
What's changed?
XmlUtil.fromXml(String, TypeReference<T>) returns early when the XML string is nonempty. Valid generic XML input therefore never reaches Jackson; null input instead reaches the parser and can throw.
Correct the inverted empty-input guard. Add map, list, nested generic, null/empty/malformed input and Class-overload control tests. This repairs a public utility; no current production caller of this overload was found.
Fixes #4433.
Validation: JDK 26 targeting Java 25: XmlUtilTest, 5 tests passed using Maven verify with default checkstyle/enforcer. The original implementation produced 3 failures and 1 error. Coverage reporting was skipped because no JaCoCo execution file was produced.
Checklist
Add or update API
No new endpoint or API signature.
AI assistance: implementation and initial review used DeepSeek; Codex coordinated final review and local verification.