mirror of
https://github.com/zaaarf/lillero-processor.git
synced 2024-11-22 15:34:57 +01:00
fix: fixed uncaught MirroredTypeException
This commit is contained in:
parent
2999aef5a5
commit
6a06713210
2 changed files with 8 additions and 7 deletions
|
@ -137,18 +137,20 @@ public class ASTUtils {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finds the class name and maps it to the correct format.
|
* Finds the class name and maps it to the correct format.
|
||||||
*
|
|
||||||
* @param patchAnn the {@link Patch} annotation containing target class info
|
* @param patchAnn the {@link Patch} annotation containing target class info
|
||||||
* @param finderAnn an annotation containing metadata to fall back on, may be null
|
* @param finderAnn an annotation containing metadata about the target, may be null
|
||||||
* @param parentFun the function to get the parent from the finderAnn
|
* @param parentFun the function to get the parent from the finderAnn
|
||||||
* @return the fully qualified class name
|
* @return the fully qualified class name
|
||||||
* @since 0.3.0
|
* @since 0.3.0
|
||||||
*/
|
*/
|
||||||
private static <T extends Annotation> String findClassName(Patch patchAnn, T finderAnn, Function<T, Class<?>> parentFun) {
|
private static <T extends Annotation> String findClassName(Patch patchAnn, T finderAnn, Function<T, Class<?>> parentFun) {
|
||||||
String fullyQualifiedName =
|
String fullyQualifiedName;
|
||||||
finderAnn == null || parentFun.apply(finderAnn) == Object.class
|
if(finderAnn != null) {
|
||||||
? getClassFullyQualifiedName(patchAnn, Patch::value)
|
fullyQualifiedName = getClassFullyQualifiedName(finderAnn, parentFun);
|
||||||
: getClassFullyQualifiedName(finderAnn, parentFun);
|
if(!fullyQualifiedName.equals("java.lang.Object"))
|
||||||
|
return findClassName(fullyQualifiedName, null);
|
||||||
|
}
|
||||||
|
fullyQualifiedName = getClassFullyQualifiedName(patchAnn, Patch::value);
|
||||||
return findClassName(fullyQualifiedName, null);
|
return findClassName(fullyQualifiedName, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -144,7 +144,6 @@ public class ObfuscationMapper {
|
||||||
*/
|
*/
|
||||||
private final Map<String, String> members;
|
private final Map<String, String> members;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The constructor. It takes in the names (obfuscated and non-obfuscated)
|
* The constructor. It takes in the names (obfuscated and non-obfuscated)
|
||||||
* of a class.
|
* of a class.
|
||||||
|
|
Loading…
Reference in a new issue