Bug 328099 - AspectJ LTW should honor the ProtectionDomain
Summary: AspectJ LTW should honor the ProtectionDomain
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: LTWeaving (show other bugs)
Version: 1.6.9   Edit
Hardware: PC Windows 7
: P3 major with 5 votes (vote)
Target Milestone: 1.6.12   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-19 04:11 EDT by Fredrik Lindskog CLA
Modified: 2011-05-02 14:43 EDT (History)
2 users (show)

See Also:


Attachments
Small program to reproduce the problem (1.49 MB, application/x-zip-compressed)
2010-10-19 04:14 EDT, Fredrik Lindskog CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fredrik Lindskog CLA 2010-10-19 04:11:18 EDT
Build Identifier: 

We are having problem running the AspectJ LTW whith signed jars.
It appears to be that the LTW is not honoring the ProtectionDomain when creating the inner classes of the woven class, i.e. $AjcClosure1.

Reproducible: Always

Steps to Reproduce:
Instructions on how to reproduce the problem with the attached zip-file
Prerequisites:
- Maven 2 installed
- java should be on the path

1. Compile and package
> mvn clean package

2. Run without signing the jar
> mvn exec:exec

==> "pre...Foo.bar()...post" is written on stdout.

3. Sign the jar
> mvn jarsigner:sign

4. Run again
> mvn exec:exec

==> ClassNotFoundException!!!
Comment 1 Fredrik Lindskog CLA 2010-10-19 04:14:03 EDT
Created attachment 181157 [details]
Small program to reproduce the problem

A small maven project with code to reproduce the problem.
Please read the README file for instructions.
Comment 2 Fredrik Lindskog CLA 2010-10-20 02:23:19 EDT
Just to be clear: This is preventing us to use the AspectJ, since we're using signed jars.
Comment 3 Andrew Clement CLA 2011-05-02 14:43:28 EDT
fixed!  thanks for the great test program.  The protection domain used for a class that is about to be defined is also used for generated classes (generated during the weaving of that type).