Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Matching methods with a particular argument type

But it doesn't seem to work when the Transaction object is null? Is that expected?

Yes, because args(v) where v has type T says that the concrete type at
runtime of the object that is passed in as argument has to be of type
T (or any subtype). null is not of type T.

Having said that, stricktly speaking, null is of type NullType, which
should be subtype of any type... anyway, it's a design decision. The
intend is that if you specify something like this, you should be able
to rely on the fact that v is bound to an *object* of type T.

Eric


Back to the top