Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Xlint:adviceDidNotMatch with iajc source at 1.5

Hi,

The adviceDidNotMatch warning is an Xlint that is only produced when
compiling in 'java5 mode' - and that is because when it gets
irritating we provide an easy way to suppress it.  The following
annotation can be attached to advice to stop it coming out.

@SuppressAjWarnings({"adviceDidNotMatch"})

The warning is indicating that you have some advice that does not
match and probably has never matched, you just never knew at Java1.4
level.

If it really did match at Java1.4 but is not at Java1.5 then the only
thing that can affect a match is auto-boxing.  Is it possible the
joinpoints that are selected by your pointcuts could be getting
autoboxing behaviour applied? ie. the auto promotion/demotion of
primitive types to their object equivalents? (int<>Integer, etc).

cheers,
Andy.

On 26/11/2007, Hartrey, Edel <Edel.Hartrey@xxxxxxx> wrote:
> Hi there,
>
> I'm an AspectJ novice that has inherited some AspectJ code, and in the
> process of an upgrade to Java 1.5 I've run into a problem that I would
> greatly appreciate some insight into.
>
> The AspectJ code is only a small part of a larger codebase but it is
> being moved from Java 1.4 to Java 1.5.  When I compiled the code with
> iajc (AspectJ 1.5.3), with source attribute set to 1.5, I got the
> following error for each location where around advice is being applied
> in the code:
>
> [warning] advice defined in com.xxx.xxx.StrutsInterceptor has not been
> applied [Xlint:adviceDidNotMatch]
>
> The code compiles without error or warning on iajc with source level set
> to 1.4.
>
> The ant task that runs this compile is defined as follows:
>         <iajc fork="true"
>                 source="1.5"
>               deprecation="@{deprecation}"
>               debug="@{debug}"
>               X="noInline"
>               destdir="@{destdir}"
>               classpathref="@{classpathref}"
>               forkclasspathref="aspectj.classpath">
>               <sourceroots>
>                 <pathelement location="${iajc.src.dir1}"/>
>               </sourceroots>
>         </iajc>
>
> Any insight is appreciated,
> Kind regards,
> - Edel
>
>
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>


Back to the top