From 350a49b4fc47b45df8cca0b74624d38fbb94c82d Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 23 Apr 2013 03:08:40 +0200 Subject: added temporary debug switch -Dlombok.debugAsmOnly for issue 470. --- src/core/lombok/bytecode/PreventNullAnalysisRemover.java | 1 + src/core/lombok/bytecode/SneakyThrowsRemover.java | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/lombok/bytecode/PreventNullAnalysisRemover.java b/src/core/lombok/bytecode/PreventNullAnalysisRemover.java index ca608a3e..3342eacb 100644 --- a/src/core/lombok/bytecode/PreventNullAnalysisRemover.java +++ b/src/core/lombok/bytecode/PreventNullAnalysisRemover.java @@ -61,6 +61,7 @@ public class PreventNullAnalysisRemover implements PostCompilerTransformation { if (hit && !"(Ljava/lang/Object;)Ljava/lang/Object;".equals(desc)) hit = false; if (hit) { changesMade.set(true); + if (System.getProperty("lombok.debugAsmOnly", null) != null) super.visitMethodInsn(opcode, owner, name, desc); // DEBUG for issue 470! } else { super.visitMethodInsn(opcode, owner, name, desc); } diff --git a/src/core/lombok/bytecode/SneakyThrowsRemover.java b/src/core/lombok/bytecode/SneakyThrowsRemover.java index 8143d860..c54495d4 100644 --- a/src/core/lombok/bytecode/SneakyThrowsRemover.java +++ b/src/core/lombok/bytecode/SneakyThrowsRemover.java @@ -61,7 +61,11 @@ public class SneakyThrowsRemover implements PostCompilerTransformation { "(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;".equals(desc)) { changesMade.set(true); - super.visitInsn(Opcodes.ATHROW); + if (System.getProperty("lombok.debugAsmOnly", null) != null) { + super.visitMethodInsn(opcode, owner, name, desc); // DEBUG for issue 470! + } else { + super.visitInsn(Opcodes.ATHROW); + } } else { super.visitMethodInsn(opcode, owner, name, desc); } -- cgit