]> source.dussan.org Git - aspectj.git/commitdiff
277959: stack depth must be at least one if there is an exception handler
authoraclement <aclement>
Thu, 28 May 2009 00:12:47 +0000 (00:12 +0000)
committeraclement <aclement>
Thu, 28 May 2009 00:12:47 +0000 (00:12 +0000)
tests/bugs165/pr277959/AOPTest.java [new file with mode: 0644]
tests/bugs165/pr277959/CodeAspect.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc165/Ajc165Tests.java
tests/src/org/aspectj/systemtest/ajc165/ajc165.xml

diff --git a/tests/bugs165/pr277959/AOPTest.java b/tests/bugs165/pr277959/AOPTest.java
new file mode 100644 (file)
index 0000000..593e6a3
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * AOPTest
+ * Copyright (c) 2001-2006 MessageOne Inc.
+ */
+package example;
+
+public class AOPTest {
+    public static void doSomething() {}
+
+    public static void cleanup() {
+        try {
+            doSomething();
+            doSomething();
+        } catch(Exception ex) {
+            // ignore
+        }
+    }
+    public static void cleanup2() {
+        try {
+
+            doSomething();
+        } catch(Exception ex) {
+            // ignore
+        }
+    }
+
+
+    public static void main(String[] args) throws Throwable {
+        AOPTest.cleanup();
+    }
+}
+
diff --git a/tests/bugs165/pr277959/CodeAspect.java b/tests/bugs165/pr277959/CodeAspect.java
new file mode 100644 (file)
index 0000000..dd3017a
--- /dev/null
@@ -0,0 +1,14 @@
+import java.lang.Class;
+import org.aspectj.lang.reflect.MethodSignature;
+import org.aspectj.lang.*;
+
+public aspect CodeAspect {
+    pointcut getPointcut()
+      : execution(public * example.AOPTest.cleanup());
+
+    Object around() : getPointcut() {
+        System.out.println("ASPECT WORKING");
+        //Just call the underlying method
+        return proceed();
+    }
+}
index 9d1a6159ba264d820079f0ee5b517fe17597191b..cd67252a069ac15c8e135005ea35779060e2c182 100644 (file)
@@ -20,6 +20,10 @@ import org.aspectj.weaver.LintMessage;
 
 public class Ajc165Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
 
+       public void testVerifyError_pr277959() {
+               runTest("verifyerror");
+       }
+
        public void testIfNames_pr277508() {
                runTest("if method names");
        }
index cacaf1b849ecea3e33d097ae06d4545ab4ad386a..dc8d533c9f981851672c12f2ed6d1e117a5e6d72 100644 (file)
@@ -2,6 +2,11 @@
 
 <suite>
 
+   <ajc-test dir="bugs165/pr277959" title="verifyerror">
+     <compile files="AOPTest.java  CodeAspect.java" options="-1.5"/>
+     <run class="example.AOPTest"/>
+   </ajc-test>
+   
    <ajc-test dir="bugs165/pr277508" title="if method names">
      <compile files="Basic.java" options="-1.5"/>
      <run class="Basic">