From 05c97e8bfa25dd577a21b680760b2736fc541849 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Thu, 30 Sep 2010 21:43:03 +0200 Subject: bugfix for the sneakyThrows remover: In rare cases would erroneously delete an ATHROW opcode. --- src/core/lombok/bytecode/SneakyThrowsRemover.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/lombok') diff --git a/src/core/lombok/bytecode/SneakyThrowsRemover.java b/src/core/lombok/bytecode/SneakyThrowsRemover.java index fde29924..71596f60 100644 --- a/src/core/lombok/bytecode/SneakyThrowsRemover.java +++ b/src/core/lombok/bytecode/SneakyThrowsRemover.java @@ -71,7 +71,7 @@ public class SneakyThrowsRemover implements PostCompilerTransformation { return writer.toByteArray(); } - @Override public byte[] applyTransformations(byte[] original, String className, DiagnosticsReceiver diagnostics) { + @Override public byte[] applyTransformations(byte[] original, String fileName, DiagnosticsReceiver diagnostics) { if (!new ClassFileMetaData(original).usesMethod("lombok/Lombok", "sneakyThrow")) return null; byte[] fixedByteCode = fixJSRInlining(original); @@ -89,6 +89,7 @@ public class SneakyThrowsRemover implements PostCompilerTransformation { } @Override public void visitMethodInsn(int opcode, String owner, String name, String desc) { + justAddedAthrow = false; boolean hit = true; if (hit && opcode != Opcodes.INVOKESTATIC) hit = false; if (hit && !"sneakyThrow".equals(name)) hit = false; -- cgit