diff options
author | zaaarf <zaaarf@proton.me> | 2023-03-27 22:49:47 +0200 |
---|---|---|
committer | zaaarf <zaaarf@proton.me> | 2023-03-27 22:49:47 +0200 |
commit | 5b4b63021e1c7111197439f43e4991b8d7af2c58 (patch) | |
tree | eab6afa0019c074ab5cdccbac54a07b10b80176b /src/main/java/ftbsc/lll/proxies/impl | |
parent | ab7fbd3f6eeb9d8a6642d14f5b60b76fe6c48714 (diff) |
fix: stackoverflowerror (infinite recursion)
Diffstat (limited to 'src/main/java/ftbsc/lll/proxies/impl')
-rw-r--r-- | src/main/java/ftbsc/lll/proxies/impl/TypeProxy.java | 6 |
1 files changed, 3 insertions, 3 deletions
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); } |