diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2010-09-30 21:43:03 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2010-09-30 21:43:03 +0200 |
commit | 05c97e8bfa25dd577a21b680760b2736fc541849 (patch) | |
tree | fd642f0fe9f568f6d2ed9deb2b81a5c51487ff63 /src/core/lombok/bytecode/SneakyThrowsRemover.java | |
parent | c10b91309ecb6fe4b38e0097cd93cc124c78436c (diff) | |
download | lombok-05c97e8bfa25dd577a21b680760b2736fc541849.tar.gz lombok-05c97e8bfa25dd577a21b680760b2736fc541849.tar.bz2 lombok-05c97e8bfa25dd577a21b680760b2736fc541849.zip |
bugfix for the sneakyThrows remover: In rare cases would erroneously delete an ATHROW opcode.
Diffstat (limited to 'src/core/lombok/bytecode/SneakyThrowsRemover.java')
-rw-r--r-- | src/core/lombok/bytecode/SneakyThrowsRemover.java | 3 |
1 files changed, 2 insertions, 1 deletions
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; |