Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 39623 Details for
Bug 138798
BCException on invalid annotation match
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
test
bug138798.test.patch.txt (text/plain), 3.17 KB, created by
Ron Bodkin
on 2006-04-26 23:00:04 EDT
(
hide
)
Description:
test
Filename:
MIME Type:
Creator:
Ron Bodkin
Created:
2006-04-26 23:00:04 EDT
Size:
3.17 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P tests >Index: src/org/aspectj/systemtest/ajc152/Ajc152Tests.java >=================================================================== >RCS file: /home/technology/org.aspectj/modules/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java,v >retrieving revision 1.12 >diff -u -r1.12 Ajc152Tests.java >--- src/org/aspectj/systemtest/ajc152/Ajc152Tests.java 26 Apr 2006 16:45:17 -0000 1.12 >+++ src/org/aspectj/systemtest/ajc152/Ajc152Tests.java 27 Apr 2006 02:46:24 -0000 >@@ -39,6 +39,8 @@ > // public void testDoubleAnnotationMatching_pr138223() { runTest("Double at annotation matching (no binding)");} > > public void testNoClassCastExceptionWithPerThis_pr138286() { runTest("No ClassCastException with perThis");} >+ >+ public void testAtWithinCodeBug_pr138798() { runTest("atWithinCodeBug"); } > > // this next one reported as a bug by Rob Harrop, but I can't reproduce the failure yet... > //public void testAtAspectWithReferencePCPerClause_pr138220() { runTest("@Aspect with reference pointcut in perclause");} >Index: src/org/aspectj/systemtest/ajc152/ajc152.xml >=================================================================== >RCS file: /home/technology/org.aspectj/modules/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml,v >retrieving revision 1.10 >diff -u -r1.10 ajc152.xml >--- src/org/aspectj/systemtest/ajc152/ajc152.xml 26 Apr 2006 16:45:17 -0000 1.10 >+++ src/org/aspectj/systemtest/ajc152/ajc152.xml 27 Apr 2006 02:46:24 -0000 >@@ -183,4 +183,12 @@ > </run> > </ajc-test> > >+ <ajc-test dir="bugs152/pr138798" title="atWithinCodeBug"> >+ <compile files="ErrorHandling.aj" options="-1.5"/> >+ <run class="ErrorHandling"> >+ <stderr> >+ <line text="Caught in foo"/> >+ </stderr> >+ </run> >+ </ajc-test> > </suite> >\ No newline at end of file >Index: bugs152/pr138798/ErrorHandling.aj >=================================================================== >RCS file: bugs152/pr138798/ErrorHandling.aj >diff -N bugs152/pr138798/ErrorHandling.aj >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ bugs152/pr138798/ErrorHandling.aj 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,41 @@ >+import org.aspectj.lang.JoinPoint.StaticPart; >+ >+import java.lang.annotation.Retention; >+import java.lang.annotation.RetentionPolicy; >+ >+//@Retention(RetentionPolicy.RUNTIME) >+@interface NormalException { >+ /** The default of Void means ANY throwable */ >+ Class[] value() default Void.class; >+} >+ >+public aspect ErrorHandling { >+ >+ before(Throwable throwable) : handler(*) && args(throwable) && !@withincode(NormalException) { >+ System.err.println("Caught in "+thisEnclosingJoinPointStaticPart.getSignature().getName()); >+ } >+ >+ public static void main(String argz[]) { >+ new Test().checkConnection(); >+ } >+} >+ >+class Test { >+ @NormalException(Exception.class) >+ protected void checkConnection() { >+ try { >+ foo(); >+ } catch (Exception e) { >+ ;//skip warning >+ } >+ } >+ >+ private void foo() { >+ try { >+ throw new RuntimeException(); >+ } catch (RuntimeException e) { >+ throw e; >+ } >+ } >+ >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
aclement
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 138798
: 39623