Community
Participate
Working Groups
Compiling this simple aspect results in an IllegalArgumentException. I don't know if the aspect should've compiled correctly, but it certainly requires a better error message from the compiler if not. package test.providers.java; import java.util.Map; import javax.wsdl.BindingOperation; import javax.wsdl.Port; import org.apache.wsif.providers.java.WSIFOperation_Java; import org.apache.wsif.providers.java.WSIFPort_Java; import org.apache.wsif.WSIFException; privileged public aspect SampleAspect { void around(Port p, BindingOperation b, WSIFPort_Java javaPort, Map m) throws WSIFException: initialization( WSIFOperation_Java.new(Port, BindingOperation, WSIFPort_Java, Map) ) && args(port, binding, javaPort, typeMaps) { System.out.println( "Around advice." ); } } I compiled with the following ant task: <taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties"> <classpath> <pathelement location="/aspectj1.2/lib/aspectjtools.jar"/> </classpath> </taskdef> .... <target name="aspectj" depends="init" > <iajc verbose="false" destdir="../classes" injars="${wsif.jar}"> <sourceroots> <pathelement location="../src/test/providers/java" /> </sourceroots> .... </iajc>
Created attachment 10115 [details] Compiler Output
I've fixed the IllegalArgumentException under bug #59397. It is due to not being able to get the right line number for a shadow. The fix will be in 1.2 RC2 - due this week. With the fix you get a message: around on initialization not supported (compiler limitation)
fixed by andy.