Fix redirectTypeGetName overflow (#818)

This commit is contained in:
IzzelAliz 2022-11-22 13:34:00 +08:00
parent bdc85d3846
commit 83245803e1
No known key found for this signature in database
GPG Key ID: EE50E123A11D8338

View File

@ -173,9 +173,9 @@ public class ArclightReflectionHandler extends ClassLoader {
// srg -> bukkit
public static String redirectTypeGetName(java.lang.reflect.Type type) {
if (type instanceof Class cl) {
if (type instanceof Class<?> cl) {
if (cl.isArray()) {
return redirectTypeGetName(cl) + "[]";
return redirectTypeGetName(cl.getComponentType()) + "[]";
}
return redirectClassGetName(cl);
} else if (type instanceof WildcardType wType) {