Fix redirectTypeGetName overflow (#818)
This commit is contained in:
parent
bdc85d3846
commit
83245803e1
|
@ -173,9 +173,9 @@ public class ArclightReflectionHandler extends ClassLoader {
|
||||||
|
|
||||||
// srg -> bukkit
|
// srg -> bukkit
|
||||||
public static String redirectTypeGetName(java.lang.reflect.Type type) {
|
public static String redirectTypeGetName(java.lang.reflect.Type type) {
|
||||||
if (type instanceof Class cl) {
|
if (type instanceof Class<?> cl) {
|
||||||
if (cl.isArray()) {
|
if (cl.isArray()) {
|
||||||
return redirectTypeGetName(cl) + "[]";
|
return redirectTypeGetName(cl.getComponentType()) + "[]";
|
||||||
}
|
}
|
||||||
return redirectClassGetName(cl);
|
return redirectClassGetName(cl);
|
||||||
} else if (type instanceof WildcardType wType) {
|
} else if (type instanceof WildcardType wType) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user