From 06398fa25990b458ee3183e0cf9066a3a75f221e Mon Sep 17 00:00:00 2001 From: cpw Date: Sun, 17 May 2015 10:08:46 -0400 Subject: [PATCH] Clean up transformers a bit. Can't use COMPUTE_FRAMES even though it's required - the game refuses to even run if I do. Note for j8: when we force Java8 classes, all coremods will need a thorough overhaul - the current way we do things is not sustainable when Java8 becomes the universal norm. --- .../common/asm/transformers/EventSubscriptionTransformer.java | 2 +- .../cpw/mods/fml/common/asm/transformers/MarkerTransformer.java | 2 +- .../cpw/mods/fml/common/asm/transformers/SideTransformer.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fml/src/main/java/cpw/mods/fml/common/asm/transformers/EventSubscriptionTransformer.java b/fml/src/main/java/cpw/mods/fml/common/asm/transformers/EventSubscriptionTransformer.java index fd77ebcbc..0062ab829 100644 --- a/fml/src/main/java/cpw/mods/fml/common/asm/transformers/EventSubscriptionTransformer.java +++ b/fml/src/main/java/cpw/mods/fml/common/asm/transformers/EventSubscriptionTransformer.java @@ -65,7 +65,7 @@ public class EventSubscriptionTransformer implements IClassTransformer { if (buildEvents(classNode)) { - ClassWriter cw = new ClassWriter(COMPUTE_MAXS | COMPUTE_FRAMES); + ClassWriter cw = new ClassWriter(COMPUTE_FRAMES); classNode.accept(cw); return cw.toByteArray(); } diff --git a/fml/src/main/java/cpw/mods/fml/common/asm/transformers/MarkerTransformer.java b/fml/src/main/java/cpw/mods/fml/common/asm/transformers/MarkerTransformer.java index 8f05923dc..30abc68e6 100644 --- a/fml/src/main/java/cpw/mods/fml/common/asm/transformers/MarkerTransformer.java +++ b/fml/src/main/java/cpw/mods/fml/common/asm/transformers/MarkerTransformer.java @@ -100,7 +100,7 @@ public class MarkerTransformer implements IClassTransformer @Override public byte[] transform(String name, String transformedName, byte[] bytes) { - if (bytes == null) { return null; } + if (bytes == null) { return null; } if (!markers.containsKey(name)) { return bytes; } ClassNode classNode = new ClassNode(); diff --git a/fml/src/main/java/cpw/mods/fml/common/asm/transformers/SideTransformer.java b/fml/src/main/java/cpw/mods/fml/common/asm/transformers/SideTransformer.java index 3f45115ee..4904613aa 100644 --- a/fml/src/main/java/cpw/mods/fml/common/asm/transformers/SideTransformer.java +++ b/fml/src/main/java/cpw/mods/fml/common/asm/transformers/SideTransformer.java @@ -35,7 +35,7 @@ public class SideTransformer implements IClassTransformer @Override public byte[] transform(String name, String transformedName, byte[] bytes) { - if (bytes == null) { return null; } + if (bytes == null) { return null; } ClassNode classNode = new ClassNode(); ClassReader classReader = new ClassReader(bytes);