Bug 514440 - Around advice on constructor fails when using Spring, LTW, and PowerMock
Summary: Around advice on constructor fails when using Spring, LTW, and PowerMock
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: LTWeaving (show other bugs)
Version: 1.8.10   Edit
Hardware: PC Windows 10
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-29 15:39 EDT by Guy Paddock CLA
Modified: 2017-03-29 17:11 EDT (History)
0 users

See Also:


Attachments
Error dumps, partial test cases for method + constructor tracing, and aspect (with supporting files) (12.64 KB, application/octet-stream)
2017-03-29 15:39 EDT, Guy Paddock CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guy Paddock CLA 2017-03-29 15:39:11 EDT
Created attachment 267535 [details]
Error dumps, partial test cases for method + constructor tracing, and aspect (with supporting files)

We're attempting to define an aspect for LTW of trace logging of methods and constructors. Method tracing is working well, now that we're excluding CGLIB from being woven (was previously leading to a VerifyError about invalid constant in pool).

But, now constructor tracing throws an NPE, and it doesn't seem like there's a workaround for this.

Error dump, partial test cases for method + constructor tracing, and aspect (with supporting files) are attached.

If I change the "around" advice to "before" and "after" advice, I get "java.lang.VerifyError: Bad local variable type" instead. That error trace is also attached.

This Gradle submodule is using:

compile group: 'org.springframework', name: 'spring-web', version: '4.3.5.RELEASE'
testCompile group: 'org.mockito', name: 'mockito-all', version: '1.10.19'
testCompile group: 'org.powermock', name: 'powermock-module-junit4', version: '1.6.5'
testCompile group: 'org.powermock', name: 'powermock-api-mockito', version: '1.6.5'