hutiefang76 opened a new pull request, #4435:
URL: https://github.com/apache/hertzbeat/pull/4435

   ## 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.
   
   ```shell
   mvn -pl hertzbeat-common-core,hertzbeat-collector/hertzbeat-collector-basic 
-am -Dtest=XmlUtilTest,SshCollectImplTest 
-Dsurefire.failIfNoSpecifiedTests=false verify
   ```
   
   ## Checklist
   
   - [x] I have read the Contributing Guide.
   - [x] I have written the necessary comments.
   - [x] I added regression tests and the affected test classes passed.
   
   ## 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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to