fixed pojoutils string class issue
Hi
Environment
- Dubbo version: 3.2.0
- Operating System version: mac os 12.2
- Java version: 21
when i use telnet to invoke , it will throw exception
dubbo>invoke com.xxx.api.PService.check({"value": 1, "class": "java.lang.Long"}, {"value": 1, "class": "java.lang.Long"}, {"value": "abc", "class": "java.lang.String"}, {"value": "c", "class": "java.lang.String"})
Its response:
i have add this code for fixed issue: org.apache.dubbo.common.utils.PojoUtils#realize0
this is test case
Brief changelog
Verifying this change
Checklist
- [x] Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
- [ ] Each commit in the pull request should have a meaningful subject line and body.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
- [ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
- [ ] Add some description to dubbo-website project if you are requesting to add a feature.
- [ ] GitHub Actions works fine on your own branch.
- [ ] If this contribution is large, please follow the Software Donation Guide.
Please fix the code style
is use jdk21 to run unit test?
it's should requred to add jvm args "--add-opens java.base/java.math=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED"? please help to check
is use jdk21 to run unit test? it's should requred to add jvm args "--add-opens java.base/java.math=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED"? please help to check
As design, Dubbo itself should not require any --add-opens configuration
in this method: org.apache.dubbo.common.utils.PojoUtils#getField
when the acls is jdk class , we cannot modify field accessible. could we can add this code to ignore jdk classes?
add check it's if jdk classes
Quality Gate passed
Issues
1 New issue
0 Accepted issues
Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code
is use jdk21 to run unit test? it's should requred to add jvm args "--add-opens java.base/java.math=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED"? please help to check