shangxinxiaolin opened a new pull request, #3760:
URL: https://github.com/apache/dubbo-go/pull/3760

   ### Description
   
   Fixes #3759
   
   Return an untyped nil for typed nil pointers before POJO inspection or 
pointer dereferencing in `objToMap()`. Previously, ordinary pointers triggered 
a reflection panic and nil POJO pointers could panic during `JavaClassName()` 
or field access.
   
   Add six regression cases through the public `MapGeneralizer.Generalize()` 
API covering plain structs, POJOs, scalar pointers, indirect pointers, slice 
elements, and map values. All six fail on the original code and pass with this 
change.
   
   ### Validation
   
   - `go test ./filter/generic/... -count=1` — passed
   - `go vet ./filter/generic/...` — passed
   - Changed Go files formatted with `gofmt`; `git diff --check` passed.
   
   ### Checklist
   - [x] I confirm the target branch is `develop`
   - [ ] I have run `make fmt` to format my code (used `gofmt` on changed files)
   - [ ] I have run `make test` to run local tests (ran the affected generic 
packages instead)
   - [x] I have added tests that prove my fix is effective or that my feature 
works
   


-- 
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