From d72d8c836993c5c85b8ee97b3b458c3d26930dd3 Mon Sep 17 00:00:00 2001 From: GraxCode Date: Tue, 5 May 2020 14:54:09 +0200 Subject: [PATCH] format --- .../threadtear/execution/analysis/ReobfuscateClassNames.java | 4 ++-- .../nov/threadtear/execution/analysis/RestoreSourceFiles.java | 4 ++-- .../threadtear/swing/tree/component/ExecutionTreeNode.java | 2 +- src/me/nov/threadtear/util/asm/References.java | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/me/nov/threadtear/execution/analysis/ReobfuscateClassNames.java b/src/me/nov/threadtear/execution/analysis/ReobfuscateClassNames.java index 030889a..0778090 100644 --- a/src/me/nov/threadtear/execution/analysis/ReobfuscateClassNames.java +++ b/src/me/nov/threadtear/execution/analysis/ReobfuscateClassNames.java @@ -29,8 +29,8 @@ public boolean execute(Map classes, boolean verbose) { c.node.name = map.getOrDefault(c.node.name, c.node.name); }); logger.info("Updating code references"); - int refs = classes.values().stream().map(c -> c.node.methods).flatMap(List::stream).map(m -> m.instructions.toArray()).flatMap(Arrays::stream) - .mapToInt(ain -> References.remapClassRefs(map, ain)).sum(); + int refs = classes.values().stream().map(c -> c.node.methods).flatMap(List::stream).map(m -> m.instructions.toArray()).flatMap(Arrays::stream).mapToInt(ain -> References.remapClassRefs(map, ain)) + .sum(); logger.info(refs + " code references updated successfully!"); classes.values().stream().map(c -> c.node.methods).flatMap(List::stream).forEach(m -> References.remapMethodType(map, m)); classes.values().stream().map(c -> c.node.fields).flatMap(List::stream).forEach(f -> References.remapFieldType(map, f)); diff --git a/src/me/nov/threadtear/execution/analysis/RestoreSourceFiles.java b/src/me/nov/threadtear/execution/analysis/RestoreSourceFiles.java index 922cfab..41c89f2 100644 --- a/src/me/nov/threadtear/execution/analysis/RestoreSourceFiles.java +++ b/src/me/nov/threadtear/execution/analysis/RestoreSourceFiles.java @@ -48,8 +48,8 @@ public boolean execute(Map classes, boolean verbose) { logger.info("Updating class names"); classes.values().stream().forEach(c -> c.node.name = map.getOrDefault(c.node.name, c.node.name)); logger.info("Updating code references"); - int refs = classes.values().stream().map(c -> c.node.methods).flatMap(List::stream).map(m -> m.instructions.toArray()).flatMap(Arrays::stream) - .mapToInt(ain -> References.remapClassRefs(map, ain)).sum(); + int refs = classes.values().stream().map(c -> c.node.methods).flatMap(List::stream).map(m -> m.instructions.toArray()).flatMap(Arrays::stream).mapToInt(ain -> References.remapClassRefs(map, ain)) + .sum(); logger.info(refs + " code references updated successfully!"); classes.values().stream().map(c -> c.node.methods).flatMap(List::stream).forEach(m -> References.remapMethodType(map, m)); classes.values().stream().map(c -> c.node.fields).flatMap(List::stream).forEach(f -> References.remapFieldType(map, f)); diff --git a/src/me/nov/threadtear/swing/tree/component/ExecutionTreeNode.java b/src/me/nov/threadtear/swing/tree/component/ExecutionTreeNode.java index 93fdd51..4c5097c 100644 --- a/src/me/nov/threadtear/swing/tree/component/ExecutionTreeNode.java +++ b/src/me/nov/threadtear/swing/tree/component/ExecutionTreeNode.java @@ -34,7 +34,7 @@ public String getTooltip() { b.append(tag.info); } b.append("

"); - if(member.getAuthor() != null) { + if (member.getAuthor() != null) { b.append(member.getAuthor()); b.append("
"); } diff --git a/src/me/nov/threadtear/util/asm/References.java b/src/me/nov/threadtear/util/asm/References.java index b69b786..73e5c44 100644 --- a/src/me/nov/threadtear/util/asm/References.java +++ b/src/me/nov/threadtear/util/asm/References.java @@ -11,6 +11,7 @@ public class References { /** * Remap class references, if ain has one + * * @param map Map * @param ain instruction * @return 1 if updated, 0 if not