From ee12ab20c13577424d36e913863364324d0ac6b9 Mon Sep 17 00:00:00 2001 From: zaaarf Date: Wed, 12 Apr 2023 19:17:11 +0200 Subject: [PATCH] fix: rename @Find's className as well --- src/main/java/ftbsc/lll/processor/annotations/Find.java | 2 +- .../ftbsc/lll/processor/tools/containers/ClassContainer.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/ftbsc/lll/processor/annotations/Find.java b/src/main/java/ftbsc/lll/processor/annotations/Find.java index 0d43d33..82dea62 100644 --- a/src/main/java/ftbsc/lll/processor/annotations/Find.java +++ b/src/main/java/ftbsc/lll/processor/annotations/Find.java @@ -34,7 +34,7 @@ public @interface Find { * defaults to empty string (not an inner class) * @since 0.5.0 */ - String className() default ""; + String innerName() default ""; /** * For a {@link FieldProxy}, this is the name of the field to find. If omitted, diff --git a/src/main/java/ftbsc/lll/processor/tools/containers/ClassContainer.java b/src/main/java/ftbsc/lll/processor/tools/containers/ClassContainer.java index dd5635f..95a71bb 100644 --- a/src/main/java/ftbsc/lll/processor/tools/containers/ClassContainer.java +++ b/src/main/java/ftbsc/lll/processor/tools/containers/ClassContainer.java @@ -10,7 +10,6 @@ import javax.lang.model.element.Element; import javax.lang.model.element.TypeElement; import javax.tools.Diagnostic; import java.lang.annotation.Annotation; -import java.util.Arrays; import java.util.function.Function; import static ftbsc.lll.processor.tools.ASTUtils.*; @@ -125,7 +124,7 @@ public class ClassContainer { */ public static ClassContainer findOrFallback(ClassContainer fallback, Find f, ProcessingEnvironment env, ObfuscationMapper mapper) { if(f == null) return fallback; - ClassContainer cl = ClassContainer.from(f, Find::value, f.className(), env, mapper); + ClassContainer cl = ClassContainer.from(f, Find::value, f.innerName(), env, mapper); return cl.fqn.equals("java.lang.Object") ? fallback : cl;