From 7ba4c563a6db8262028c19772ee17e200530389a Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Tue, 21 Apr 2009 17:20:39 +0000 Subject: [PATCH] Fixing build breakage with GroovyScriptFactoryTests. The problem was that the Messenger object was not being proxed (assertTrue(AopUtils.isAopProxy(messenger)) was returning false). The cause for this seemed to be that the pointcut was malformed / out of date, reading execution(* org.springframework.scripting.Messenger.*(..)), when the groovy Messenger class is actually declared in the org.springframework.scripting.groovy package. I tried updating the fully-qualified package name in the pointcut expression, and this caused AspectJ matching errors saying that there was not such type that matches that FQ name. So as a final resort, I removed the full-qualification entirely and went with execution(* *..Messenger.*(..)). All tests pass now, but it raises the question, why was AJ having matching errors? Is it because the pointcut matching is being done before the groovy class is loaded? There could be a potential bug here. --- .../org/springframework/scripting/groovy/groovy-with-xsd.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.springframework.context/src/test/java/org/springframework/scripting/groovy/groovy-with-xsd.xml b/org.springframework.context/src/test/java/org/springframework/scripting/groovy/groovy-with-xsd.xml index 1887788bd9..8de3522ab6 100644 --- a/org.springframework.context/src/test/java/org/springframework/scripting/groovy/groovy-with-xsd.xml +++ b/org.springframework.context/src/test/java/org/springframework/scripting/groovy/groovy-with-xsd.xml @@ -8,7 +8,7 @@ - +