From 5b4b63021e1c7111197439f43e4991b8d7af2c58 Mon Sep 17 00:00:00 2001 From: zaaarf Date: Mon, 27 Mar 2023 22:49:47 +0200 Subject: fix: stackoverflowerror (infinite recursion) --- src/main/java/ftbsc/lll/proxies/impl/TypeProxy.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/ftbsc/lll/proxies/impl') diff --git a/src/main/java/ftbsc/lll/proxies/impl/TypeProxy.java b/src/main/java/ftbsc/lll/proxies/impl/TypeProxy.java index 8001f06..4be27df 100644 --- a/src/main/java/ftbsc/lll/proxies/impl/TypeProxy.java +++ b/src/main/java/ftbsc/lll/proxies/impl/TypeProxy.java @@ -42,7 +42,7 @@ public class TypeProxy extends QualifiableProxy { * @param containerClass the FQN of the parent class of the class */ protected TypeProxy(String name, String descriptor, int modifiers, QualifiableProxy containerClass, boolean primitive) { - super(descriptor, modifiers, containerClass, String.format("%s$%s", name, containerClass.fullyQualifiedName), ProxyType.TYPE); + super(descriptor, modifiers, containerClass, String.format("%s$%s", containerClass.fullyQualifiedName, name), ProxyType.TYPE); this.primitive = primitive; } @@ -59,8 +59,8 @@ public class TypeProxy extends QualifiableProxy { String fqn = primitive ? type.getClassName() : type.getInternalName().replace('/', '.'); String simpleName = extractSimpleNameFromFQN(fqn); String parent = extractParentFromFQN(fqn); - if(fqn.contains("$")) - return new TypeProxy(simpleName, type.getDescriptor(), modifiers, from(type, Modifier.PUBLIC), primitive); + if(fqn.contains("$") && parent != null) + return new TypeProxy(simpleName, type.getDescriptor(), modifiers, from(parent, 0, Modifier.PUBLIC), primitive); else return new TypeProxy(simpleName, type.getDescriptor(), modifiers, parent, primitive); } -- cgit v1.2.3-56-ga3b1