public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
//public void testGenericsProblem_pr151978() { runTest("generics problem");}
-// public void testMissingLineNumbersInStacktraceAfter_pr145442() { runTest("missing line numbers in stacktrace after");}
-// public void testMissingLineNumbersInStacktraceAround_pr145442() { runTest("missing line numbers in stacktrace around");}
// public void testArgnamesAndJavac_pr148381() { runTest("argNames and javac");}
// public void testCFlowXMLAspectLTW_pr149096() { runTest("cflow xml concrete aspect"); }
// public void testAmbiguousBinding_pr121805() { runTest("ambiguous binding");}
// public void testNoIllegalStateExceptionWithGenericInnerAspect_pr156058() { runTest("no IllegalStateException with generic inner aspect"); }
// public void testNegatedAnnotationMatchingProblem_pr153464() { runTest("negated annotation matching problem");}
+ public void testMissingLineNumbersInStacktraceAfter_pr145442() { runTest("missing line numbers in stacktrace after");}
+ public void testMissingLineNumbersInStacktraceAround_pr145442() { runTest("missing line numbers in stacktrace around");}
public void testGenericArrays_pr158624() { runTest("generics and arrays"); }
public void testMissingLineNumbersInStacktraceBefore_pr145442() { runTest("missing line numbers in stacktrace before");}
public void testMissingLineNumbersInStacktraceBefore_pr145442_Binary() { runTest("missing line numbers in stacktrace before - binary");}
<compile files="hello/HelloWorld.java hello/ThrowExceptionAfter.aj"/>
<run class="hello.HelloWorld">
<stderr>
- <line text="hello.HelloWorld.println(HelloWorld.java:14)"/>
+ <line text="hello.HelloWorld.println(HelloWorld.java:15)"/>
<line text="hello.HelloWorld.testStackTrace(HelloWorld.java:19)"/>
<line text="hello.HelloWorld.main(HelloWorld.java:41)"/>
</stderr>
<compile files="hello/HelloWorld.java hello/ThrowExceptionAround.aj" options="-XnoInline"/>
<run class="hello.HelloWorld">
<stderr>
- <line text="hello.HelloWorld.println(HelloWorld.java:14)"/>
+ <line text="hello.HelloWorld.println(HelloWorld.java:13)"/>
<line text="hello.HelloWorld.testStackTrace(HelloWorld.java:19)"/>
<line text="hello.HelloWorld.main(HelloWorld.java:41)"/>
</stderr>
// invoke the advice
advice.append(munger.getNonTestAdviceInstructions(this));
advice.append(returnConversionCode);
- if (getKind()==Shadow.MethodExecution) {
+ if (getKind()==Shadow.MethodExecution && linenumber>0) {
advice.getStart().addTargeter(new LineNumberTag(linenumber));
}
public abstract class FancyHelloWorld extends java.lang.Object:
public void <init>():
- ALOAD_0 // FancyHelloWorld this (line 7)
+ ALOAD_0 // LFancyHelloWorld; this (line 7)
INVOKESPECIAL java.lang.Object.<init> ()V
constructor-execution(void FancyHelloWorld.<init>())
| BIPUSH 1
ALOAD_0
ASTORE 15
method-execution(void FancyHelloWorld.main(java.lang.String[]))
- | BIPUSH 1
+ | BIPUSH 1 (line 9)
| ANEWARRAY java.lang.Object
| ASTORE 16
| ALOAD 16
public static String getName():
method-execution(java.lang.String FancyHelloWorld.getName())
- | BIPUSH 0
+ | BIPUSH 0 (line 20)
| ANEWARRAY java.lang.Object
| ASTORE 10
| NEW FancyHelloWorld$AjcClosure21
ASTORE_3 (line 9)
finally -> E1
| catch java.lang.Exception -> E0
- | | ALOAD_3 // java.io.PrintStream out (line 11)
+ | | ALOAD_3 // Ljava/io/PrintStream; out (line 11)
| | LDC "bye"
| | ASTORE 5
| | ASTORE 7
| | GOTO L0
| catch java.lang.Exception -> E0
| E0: ASTORE 11 (line 12)
- | ALOAD_3 // java.io.PrintStream out (line 13)
- | ALOAD 11 // java.lang.Exception e
+ | ALOAD_3 // Ljava/io/PrintStream; out (line 13)
+ | ALOAD 11 // Ljava/lang/Exception; e
| ASTORE 13
| ASTORE 15
| method-call(void java.io.PrintStream.println(java.lang.Object))
L0: JSR L1
GOTO L2
L1: ASTORE 21
- ALOAD_3 // java.io.PrintStream out (line 15)
+ ALOAD_3 // Ljava/io/PrintStream; out (line 15)
LDC "finally"
ASTORE 23
ASTORE 25
static final String getName_aroundBody20():
ICONST_0 (line 20)
ISTORE_0
- ILOAD_0 // int x (line 21)
+ ILOAD_0 // I x (line 21)
LDC "name"
ASTORE_2
method-call(int java.lang.String.hashCode())
| INVOKESTATIC org.aspectj.runtime.internal.Conversions.intValue (Ljava/lang/Object;)I
method-call(int java.lang.String.hashCode())
IADD
- ISTORE_0 // int x
+ ISTORE_0 // I x
LDC "name" (line 22)
ASTORE 6
constructor-call(void java.lang.StringBuffer.<init>(java.lang.String))
| INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object;
| CHECKCAST java.lang.StringBuffer
constructor-call(void java.lang.StringBuffer.<init>(java.lang.String))
- ILOAD_0 // int x
+ ILOAD_0 // I x
ISTORE 10
ASTORE 12
method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int))
public class HelloWorld extends java.lang.Object:
public void <init>():
- ALOAD_0 // HelloWorld this (line 5)
+ ALOAD_0 // LHelloWorld; this (line 5)
INVOKESPECIAL java.lang.Object.<init> ()V
constructor-execution(void HelloWorld.<init>())
| BIPUSH 1
ALOAD_0
ASTORE 5
method-execution(void HelloWorld.main(java.lang.String[]))
- | BIPUSH 1
+ | BIPUSH 1 (line 8)
| ANEWARRAY java.lang.Object
| ASTORE 6
| ALOAD 6
INVOKESTATIC org.aspectj.runtime.reflect.Factory.makeJP (Lorg/aspectj/lang/JoinPoint$StaticPart;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lorg/aspectj/lang/JoinPoint;
ASTORE 10
method-execution(void HelloWorld.main(java.lang.String[]))
- | BIPUSH 2
+ | BIPUSH 2 (line 8)
| ANEWARRAY java.lang.Object
| ASTORE 12
| ALOAD 12
end static final void main_aroundBody12(String[], org.aspectj.lang.JoinPoint)
static final void main_aroundBody14(String[], org.aspectj.lang.JoinPoint):
- BIPUSH 2
+ BIPUSH 2 (line 8)
ANEWARRAY java.lang.Object
ASTORE_2
ALOAD_2
INVOKESTATIC org.aspectj.runtime.reflect.Factory.makeJP (Lorg/aspectj/lang/JoinPoint$StaticPart;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lorg/aspectj/lang/JoinPoint;
ASTORE 8
method-execution(void HelloWorld.main(java.lang.String[]))
- | BIPUSH 2
+ | BIPUSH 2 (line 8)
| ANEWARRAY java.lang.Object
| ASTORE 9
| ALOAD 9
end static final String doit_aroundBody0(DynamicHelloWorld, String, java.util.List)
static final String doit_aroundBody2(DynamicHelloWorld, String, java.util.List):
- INVOKESTATIC MyTrace.aspectOf ()LMyTrace;
+ INVOKESTATIC MyTrace.aspectOf ()LMyTrace; (line 21)
ALOAD_0
BIPUSH 3
ANEWARRAY java.lang.Object