Bug 106461 - org.aspectj.weaver.patterns.WildTypePattern.maybeGetCleanName(WildTypePattern.java:500)
Summary: org.aspectj.weaver.patterns.WildTypePattern.maybeGetCleanName(WildTypePattern...
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-09 08:46 EDT by Valerio Schiavoni CLA
Modified: 2005-08-10 10:27 EDT (History)
0 users

See Also:


Attachments
untar and compile with ajc -source 1.5 -classpath $ASPECTJ1.5/aspectjrt.jar AnnotationTestCase (746 bytes, application/x-compressed-tar)
2005-08-09 08:49 EDT, Valerio Schiavoni CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Valerio Schiavoni CLA 2005-08-09 08:46:59 EDT
I want to declare a pointcut to capture invocation of methods on annotated
interfaces being subtypes of a given interface.

here is the full ajcore report:
http://veleno.pastebin.com/332842

i will attach a test case.
Comment 1 Valerio Schiavoni CLA 2005-08-09 08:49:58 EDT
Created attachment 25889 [details]
untar and compile with ajc -source 1.5 -classpath $ASPECTJ1.5/aspectjrt.jar AnnotationTestCase
Comment 2 Adrian Colyer CLA 2005-08-10 04:46:11 EDT
Looks like the root cause of the bug is the pointcut expression:

  /* intercept a call to an annotated resource */
  pointcut invokingAMonitoredComponent():
        call(* Service+(..)) && @annotation(MemberOfMonitoredSet);

Notice that the call expression is not well-formed (it should be call(*
Service+.*(..)) ), with a missing name pattern. However, this should be detected
during parsing and resolution, NOT with a RuntimeException.
Comment 3 Adrian Colyer CLA 2005-08-10 06:38:36 EDT
Parser exhibited similar behaviour on missing name patterns in constructor and
field patterns:

call(Foo+(..))
get(* Foo+)

Now produces compilation errors as follows:

call(* Foo+(..))
-> syntax error on token "(", "name pattern" expected

call(Foo+(..))
-> syntax error on token "(", "name pattern" expected

get(* Foo+)
-> syntax error on token ")", "name pattern" expected

Fix will be available in next published build.
Comment 4 Adrian Colyer CLA 2005-08-10 10:27:25 EDT
Fix now available in latest build on AspectJ downloads page.