Bug 106032 - AspectJ compiler allows aspects to be declared in the wrong package
Summary: AspectJ compiler allows aspects to be declared in the wrong package
Status: RESOLVED DUPLICATE of bug 45190
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-04 08:32 EDT by David Knibb CLA
Modified: 2005-08-26 11:42 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Knibb CLA 2005-08-04 08:32:47 EDT
In pure Java, classes must be declared in a package matching their place in the 
file structure, e.g. a class stored at <project root>/a/b/Foo.java must be 
declared to be in the package a.b  - if these two do not match you get a 
compiler error.


This is not the case in AspectJ - if package declarations and physical 
locations do not match there is no compiler error or warning.

This is a large problem in a loadtime weaving environment, as it prevents 
aspect from being loaded. There is no compiler error or warning though, which 
makes it hard to tell why your code is not running as expected!
Comment 1 Andrew Clement CLA 2005-08-25 12:40:54 EDT
Is this the same as bug 45190?
Comment 2 Matthew Webster CLA 2005-08-26 03:59:22 EDT
Yes
Comment 3 Adrian Colyer CLA 2005-08-26 11:42:27 EDT

*** This bug has been marked as a duplicate of 45190 ***