From 61dd93eaa02b70b701b18ad930a5a18c760ab955 Mon Sep 17 00:00:00 2001 From: BenLewis Date: Sun, 25 Oct 2015 07:38:08 +1300 Subject: [PATCH] Fixed formatting errors --- .../org/spongepowered/tools/agent/MixinAgent.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/agent/java/org/spongepowered/tools/agent/MixinAgent.java b/src/agent/java/org/spongepowered/tools/agent/MixinAgent.java index 64522bad..bb0e7ce3 100644 --- a/src/agent/java/org/spongepowered/tools/agent/MixinAgent.java +++ b/src/agent/java/org/spongepowered/tools/agent/MixinAgent.java @@ -65,11 +65,11 @@ public class MixinAgent implements IHotSwap { targets = MixinAgent.this.classTransformer.reload(className.replace('/', '.'), classfileBuffer); } catch (MixinReloadException e) { MixinAgent.logger.error("mixin " + e.getMixinInfo() + " cannot be reloaded, needs a restart to be applied: " + e.getMessage()); - return ERROR_BYTECODE; + return MixinAgent.ERROR_BYTECODE; } catch (Throwable th) { // catch everything as otherwise it is ignored MixinAgent.logger.error("Error while finding targets for mixin " + className, th); - return ERROR_BYTECODE; + return MixinAgent.ERROR_BYTECODE; } for (String target : targets) { String targetName = target.replace('/', '.'); @@ -79,13 +79,13 @@ public class MixinAgent implements IHotSwap { byte[] targetBytecode = MixinAgent.classLoader.getOriginalTargetBytecode(targetName); if (targetBytecode == null) { MixinAgent.logger.error("Target class " + targetName + " hasn't registered its bytecode"); - return ERROR_BYTECODE; + return MixinAgent.ERROR_BYTECODE; } targetBytecode = MixinAgent.this.classTransformer.transform(null, targetName, targetBytecode); instrumentation.redefineClasses(new ClassDefinition(targetClass, targetBytecode)); } catch (Throwable th) { MixinAgent.logger.error("Error while re-transforming target class " + target, th); - return ERROR_BYTECODE; + return MixinAgent.ERROR_BYTECODE; } } return mixinBytecode; @@ -95,7 +95,7 @@ public class MixinAgent implements IHotSwap { return MixinAgent.this.classTransformer.transform(null, className, classfileBuffer); } catch (Throwable th) { MixinAgent.logger.error("Error while re-transforming class " + className, th); - return ERROR_BYTECODE; + return MixinAgent.ERROR_BYTECODE; } } } @@ -105,7 +105,7 @@ public class MixinAgent implements IHotSwap { * transformer this causes a class file format exception and indicates in * the ide that somethings went wrong. */ - public static byte[] ERROR_BYTECODE = new byte[]{1}; + public static final byte[] ERROR_BYTECODE = new byte[]{1}; /** * Class loader used to load mixin classes