From 78093b848c1ca74e8b6bec7c03ebd6c90d3601b9 Mon Sep 17 00:00:00 2001 From: Matt Date: Mon, 30 Sep 2024 01:43:28 -0400 Subject: [PATCH] Don't hollow out inner classes in CFR input handling --- .../recaf/services/decompile/cfr/ClassSource.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/recaf-core/src/main/java/software/coley/recaf/services/decompile/cfr/ClassSource.java b/recaf-core/src/main/java/software/coley/recaf/services/decompile/cfr/ClassSource.java index 46f3b7105..2a217c16a 100644 --- a/recaf-core/src/main/java/software/coley/recaf/services/decompile/cfr/ClassSource.java +++ b/recaf-core/src/main/java/software/coley/recaf/services/decompile/cfr/ClassSource.java @@ -3,10 +3,7 @@ import jakarta.annotation.Nonnull; import org.benf.cfr.reader.api.ClassFileSource; import org.benf.cfr.reader.bytecode.analysis.parse.utils.Pair; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassWriter; import software.coley.recaf.path.ClassPathNode; -import software.coley.recaf.util.visitors.ClassHollowingVisitor; import software.coley.recaf.workspace.model.Workspace; import java.util.Collection; @@ -62,14 +59,6 @@ public Pair getClassFileContent(String inputPath) { } else { ClassPathNode result = workspace.findClass(className); code = result == null ? null : result.getValue().asJvmClass().getBytecode(); - - // Simply CFR's work-load by gutting supporting class internals - if (code != null) { - ClassWriter writer = new ClassWriter(0); - ClassHollowingVisitor hollower = new ClassHollowingVisitor(writer); - new ClassReader(code).accept(hollower, ClassReader.SKIP_CODE); - code = writer.toByteArray(); - } } return new Pair<>(code, inputPath); }