From 71966e3348a05cb99b88885b8e6b751cc61a638e Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 19 Jan 2005 09:36:46 +0000 Subject: Fix for Bug 82570: Weaved code does not include debug lines --- weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'weaver') diff --git a/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java b/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java index 88f397818..5da038ef6 100644 --- a/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java +++ b/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java @@ -970,7 +970,14 @@ public final class LazyMethodGen { (InstructionHandle) localVariableStarts.get(tag), (InstructionHandle) localVariableEnds.get(tag)); } - + + // JAVAC adds line number tables (with just one entry) to generated accessor methods - this + // keeps some tools that rely on finding at least some form of linenumbertable happy. + // Let's check if we have one - if we don't then let's add one. + // TODO Could be made conditional on whether line debug info is being produced + if (gen.getLineNumbers().length==0) { + gen.addLineNumber(gen.getInstructionList().getStart(),1); + } } /** This procedure should not currently be used. -- cgit v1.2.3