From 2f9c24225675bfdf49e875762abe3620f118fee0 Mon Sep 17 00:00:00 2001 From: Alexander Kriegisch Date: Thu, 18 Jul 2024 09:34:50 +0200 Subject: [PATCH] Reproduce #314 by refining and extending org.aspectj.systemtest.ajc171.NewFeatures, also considering around advice types and repeated weaving, actually re-using the cache. Signed-off-by: Alexander Kriegisch --- tests/features171/pr386341/X.aj | 12 ++- .../systemtest/ajc171/newfeatures-tests.xml | 83 ++++++++++++------- 2 files changed, 64 insertions(+), 31 deletions(-) diff --git a/tests/features171/pr386341/X.aj b/tests/features171/pr386341/X.aj index 3f467b539..2dbab09a2 100644 --- a/tests/features171/pr386341/X.aj +++ b/tests/features171/pr386341/X.aj @@ -6,15 +6,23 @@ * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt * * Contributors: - * Andy Clement - Repro test case + * Andy Clement - repro test case * Abraham Nevado + * Alexander Kriegisch - repro for GitHub 314 *******************************************************************************/ aspect X { after(): execution(* *.*()) { System.out.println("It Worked-after"); } + before(): execution(* *.*()) { - System.out.println("It Worked-before"); + System.out.println("It Worked-before"); + } + + // Around advice reproduces GitHub 314 in connection with per-classloader cache + Object around(): execution(* *.*()) { + System.out.println("It Worked-around"); + return proceed(); } } diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc171/newfeatures-tests.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc171/newfeatures-tests.xml index 32f0f1845..6a18626e7 100644 --- a/tests/src/test/resources/org/aspectj/systemtest/ajc171/newfeatures-tests.xml +++ b/tests/src/test/resources/org/aspectj/systemtest/ajc171/newfeatures-tests.xml @@ -2,40 +2,65 @@ + - - - - - - + + + + + + + + + + + + + + + - - - + + + - - - - - - + + + + + + + + + + + + + + + - - + + - - - - - - + + + + + + + + + + + + + + + - - - - - - \ No newline at end of file + + + -- 2.39.5