[
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.1b2
|
Sorry for the last email, I hit send accidentally.
If you don't mind me asking, does the test case run in its current state?
Or does it generate a compile error? (I'm still figuring my way around the
tests).
If it does work I have another question:
Do interfaces in declare soft work? In other words, would this case run
without throwing an exception?
import org.aspectj.lang.*;
public class DeclareSoftCf {
public static void a(){
throw new RuntimeException("Orig");
}
public static void main(String[] args) {
boolean runtimeWasSoftened = false;
try {
a();
}
catch (SoftException e) {
throw new Error("Was softened!");
}
catch(RuntimeException e){
//success, was not softened!
}
}
public static interface Checked{
}
static aspect Softner{
declare parents : Exception+ && !RuntimeException implements
Checked;
declare soft : Checked : within(DeclareSoftCf); // ERR: Checked
not a Throwable
}
}
Thanks for the fix!
Cheers,
Nick
--- 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