From: jhugunin Date: Fri, 14 Feb 2003 01:58:32 +0000 (+0000) Subject: added test for 30026 , even though its working in the current version X-Git-Tag: V_1_1_b5~42 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8e6cef02952075a7ad3c43229bb48bea159a6cb8;p=aspectj.git added test for 30026 , even though its working in the current version --- diff --git a/tests/ajcTests.xml b/tests/ajcTests.xml index ab1a6fe0d..df307d751 100644 --- a/tests/ajcTests.xml +++ b/tests/ajcTests.xml @@ -5578,5 +5578,12 @@ + + + + + + diff --git a/tests/bugs/Finalizer.java b/tests/bugs/Finalizer.java new file mode 100644 index 000000000..f66643bc7 --- /dev/null +++ b/tests/bugs/Finalizer.java @@ -0,0 +1,26 @@ +// for Bug#: 30026 +import org.aspectj.testing.Tester; + + +public class Finalizer { + public static void main(String args[]) { + Finalizer np = new Finalizer(); + np = null; + } + + public void finalize() throws Throwable { + } +} + +aspect FinalizeContract { + pointcut finalizeCall(Object o): + this(Object+) && + this(o) && + execution(void finalize()); + + void around(Object o) throws Throwable: finalizeCall(o) { + o.finalize(); // error + //((Finalizer) o).finalize(); // ok + proceed(o); + } +}