mirror of
https://github.com/fankes/moshi.git
synced 2025-10-20 00:19:21 +08:00
Merge pull request #629 from stoyicker/patch-1
Remove unnecessary isAccessible check
This commit is contained in:
@@ -227,9 +227,7 @@ public final class Types {
|
||||
String fieldName) {
|
||||
try {
|
||||
Field field = clazz.getDeclaredField(fieldName);
|
||||
if (!field.isAccessible()) {
|
||||
field.setAccessible(true);
|
||||
}
|
||||
field.setAccessible(true);
|
||||
Annotation[] fieldAnnotations = field.getDeclaredAnnotations();
|
||||
Set<Annotation> annotations = new LinkedHashSet<>(fieldAnnotations.length);
|
||||
for (Annotation annotation : fieldAnnotations) {
|
||||
|
Reference in New Issue
Block a user