Summary: | Type pattern matching incorrect for names containing $ (dollar) | ||||||
---|---|---|---|---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | Matthew Webster <matthew_webster> | ||||
Component: | Compiler | Assignee: | Adrian Colyer <adrian.colyer> | ||||
Status: | RESOLVED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | ||||||
Version: | DEVELOPMENT | ||||||
Target Milestone: | 1.5.0RC1 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Matthew Webster
2005-11-30 06:47:25 EST
Created attachment 30860 [details]
Testcase
Shows aspect matching joinpoints in Test but not Test$$EnhancerByCGLIB$$12345
I'll look into this. As we discussed in the cafeteria, this is almost certainly because of our $->. conversion assuming inner types. fix in tree, waiting on build. Adrian - your fix for this introduced the 1.5 api isMemberClass() into the reflection based delegate. I've removed the api call but found I had to force the isNested() method that uses it to return 'true' (?!?!) in order for the tests to all pass. I'm surprised a default return value of 'true' (indicating everything is nested...) is what is required - can you take a look?? Build is through, but I still want Adrian to take a look ... (see previous comment) Doh - sorry about the 1.5 API.... but the rest of what you observed makes sense. The "splitNames" routine used to always convert $ -> ., even when it shouldn't. With the change, it only does this for a nested type. Turns out that many routes into the world create resolved types with $s in their names for nested types. It is also the case that all of the PointcutExpression tests that would have been failing for you use nested types exclusively. So defaulting to "false" would cause failure for nested types, and be different from our previous (99.99% correct) behaviour. Defaulting to true means that we will always do the conversion - which might cause trouble for reflection based resolved types under 1.4 or lower with genuine dollars in their names - but that's a pretty small set and there's not much we can do about it! |