Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
GraxCode committed May 5, 2020
1 parent 2cb6abe commit d72d8c8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public boolean execute(Map<String, Clazz> 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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public boolean execute(Map<String, Clazz> 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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public String getTooltip() {
b.append(tag.info);
}
b.append("</b></i><br><br>");
if(member.getAuthor() != null) {
if (member.getAuthor() != null) {
b.append(member.getAuthor());
b.append("<br>");
}
Expand Down
1 change: 1 addition & 0 deletions src/me/nov/threadtear/util/asm/References.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public class References {

/**
* Remap class references, if ain has one
*
* @param map Map<old class name, new class name>
* @param ain instruction
* @return 1 if updated, 0 if not
Expand Down

0 comments on commit d72d8c8

Please sign in to comment.