| Summary: | No way to exclude Proxool classes although excluded from AOP. Causing Veryfy error. | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] AspectJ | Reporter: | Abraham Nevado <info> | ||||||
| Component: | LTWeaving | Assignee: | aspectj inbox <aspectj-inbox> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | critical | ||||||||
| Priority: | P3 | CC: | aclement, info | ||||||
| Version: | 1.6.9 | ||||||||
| Target Milestone: | 1.6.10 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Abraham Nevado
Created attachment 175805 [details]
This is the unique aop.xml we are using
Created attachment 176202 [details]
Proposed Patch
I believe the issue is related to new modifications regarding fast exclusion patterns.
While before patterns such us "*..*CGLIB*" where matching for classes like com/mycompany/framework/service/MessageService$$EnhancerByCGLIB$$6dd4e683
Now the *..*CGLIB* patterns are stored in the list excludeStarDotDotStar and the next piece of code is executed:
if (!excludeStarDotDotStar.isEmpty()) {
for (String namePiece : excludeStarDotDotStar) {
int index = fastClassName.lastIndexOf('.');
if (fastClassName.indexOf(namePiece, index + 1) != -1) {
return false;
}
}
}
where fastClassName = com.mycompany.framework.service.MessageService..EnhancerByCGLIB..6dd4e683
as init previously in the line:
String fastClassName = className.replace('/', '.').replace('$', '.');
Which in turns makes the excludeStarDotDotStar method not to work as expected for this kind of patterns because GCGLIB is searched at string 6dd4e683, where never is, so it always return true.
In order to avoid this, I suggest just changing the fastClassName at the very beginning avoiding '$' substituion and just after the excludeStarDotDotStar fast pattern check is performed, substitute the '$' character by '.' to allow the rest of code work smoothly.
I have created a diff patch with this suggestion already coded.
Feedback is welcome.
Thank you.
a shame the patch is not against my repo, it does make it messier to apply. I also like to have a test with each patch to stop any future regressions. I've created a tiny test and applied the change. thanks!! |