aboutsummaryrefslogtreecommitdiff
path: root/src/utils/lombok/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/lombok/core')
-rw-r--r--src/utils/lombok/core/FieldAugment.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/utils/lombok/core/FieldAugment.java b/src/utils/lombok/core/FieldAugment.java
index ee8acf4d..4a32ad04 100644
--- a/src/utils/lombok/core/FieldAugment.java
+++ b/src/utils/lombok/core/FieldAugment.java
@@ -27,6 +27,8 @@ import java.lang.reflect.Modifier;
import java.util.Map;
import java.util.WeakHashMap;
+import lombok.permit.Permit;
+
public abstract class FieldAugment<T, F> {
private static Object getDefaultValue(Class<?> type) {
if (type == boolean.class) return false;
@@ -101,10 +103,9 @@ public abstract class FieldAugment<T, F> {
private static Field findField(Class<?> type, Class<?> wantedType, String name) {
try {
- Field f = type.getDeclaredField(name);
+ Field f = Permit.getField(type, name);
if (Modifier.isStatic(f.getModifiers()) || Modifier.isFinal(f.getModifiers())) return null;
if (!typeIsAssignmentCompatible(f.getType(), wantedType)) return null;
- f.setAccessible(true);
return f;
} catch (Exception e) {
return null;