Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] RE: [Bug 28921] Verify error on non-Throwable in declare soft 1.1 b2

Lesiecki Nicholas wrote:
> Jim,
> 
> If you don't mind me asking, does marking work? 

In the current cvs version, only subtypes of Throwable may be declared soft.  This is mainly to simplify the implementation of declare soft.  The only way that I can see marker interfaces or more general patterns being supported in 1.1 is if a good quality patch is submitted with test cases.

-Jim


> In other words, would this
> case work?
> 
> import org.aspectj.lang.*;
> 
> public class DeclareSoftCf {
> 
>     public static void a(){
>         b();
>     }
>     /**
>      * Method b.
>      */
>     private static void b() {
>         throw new RuntimeException("Orig");
>     }
> 
>     public static void main(String[] args) {
> 
> try {
>             a();
>         } catch (SoftException e) {
>             String message = e.getWrappedThrowable();
>         }
>     }
> 
>     public static interface Checked{
>     }
> 
>     static aspect Softner{
>         declare parents : Exception+ && !RuntimeException implements
> Checked;
>         declare soft : Checked : within(DeclareSoftCf);  // ERR:
> Checked
> not a Throwable
>     }
> }
> --- bugzilla-daemon@xxxxxxxxxxx wrote:
> > http://bugs.eclipse.org/bugs/show_bug.cgi?id=28921
> >
> > Jim.Hugunin@xxxxxxxx changed:
> >
> >            What    |Removed                     |Added
> >
> ----------------------------------------------------------------------
> ------
> >              Status|NEW                         |RESOLVED
> >          Resolution|                            |FIXED
> >
> >
> >
> > ------- Additional Comments From Jim.Hugunin@xxxxxxxx  2003-01-07
> 16:08
> > -------
> > fixed in cvs tree, test case at tests/bugs/DeclareSoftCf.java
> >
> >
> >
> > ------- You are receiving this mail because: -------
> > You reported the bug, or are watching the reporter.
> 
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com


Back to the top