mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-09-13 15:45:38 +02:00
Fix for
Bugzilla Bug 35551: "declare soft" in abstract aspect have no effect Specifying that declare soft behaves like advice in that it must be concretized to have an effect.
This commit is contained in:
parent
a01ac454bb
commit
abe271f8d4
@ -2224,6 +2224,23 @@
|
||||
<para>except, in addition to wrapping the exception, it also affects
|
||||
Java's static exception checking mechanism. </para>
|
||||
|
||||
<para> Like advice, the declare soft form has no effect in an
|
||||
abstract aspect that is not extended by a concreate aspect. So
|
||||
the following code will not compile unless it is compiled with an
|
||||
extending concrete aspect:</para>
|
||||
|
||||
<programlisting>
|
||||
abstract aspect A {
|
||||
abstract pointcut softeningPC();
|
||||
|
||||
before() : softeningPC() {
|
||||
Class.forName("FooClass"); // error: uncaught ClassNotFoundException
|
||||
}
|
||||
|
||||
declare soft : ClassNotFoundException : call(* Class.*(..));
|
||||
}
|
||||
</programlisting>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
|
Loading…
Reference in New Issue
Block a user