-
Notifications
You must be signed in to change notification settings - Fork 26.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed pojoutils string class issue #14102
base: 3.2
Are you sure you want to change the base?
Conversation
Quality Gate passedIssues Measures |
Quality Gate passedIssues Measures |
@@ -774,7 +778,8 @@ private static Field getField(Class<?> cls, String fieldName) { | |||
for (Class<?> acls = cls; acls != null; acls = acls.getSuperclass()) { | |||
try { | |||
result = acls.getDeclaredField(fieldName); | |||
if (!Modifier.isPublic(result.getModifiers())) { | |||
// the field is not public and it not jdk class, we will setAccessible to true | |||
if (!Modifier.isPublic(result.getModifiers()) && acls.getClassLoader() != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For JDK internal classes, even if they don't fail here, they will eventually fail.
Hi
Environment
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