Bug 74048 - AJDT reports unnecessary compile time warnings for private static aspects
Summary: AJDT reports unnecessary compile time warnings for private static aspects
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.5.0 M4   Edit
Assignee: Andrew Clement CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-16 05:30 EDT by Antti Karanta CLA
Modified: 2005-09-01 05:40 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Karanta CLA 2004-09-16 05:30:58 EDT
When using private static aspects inside a class (e.g. using the Participant 
pattern as described in Laddad: AspectJ in Action), the compiler reports a 
warning about the type never being used, e.g.:

The private type RowSet.ConstructorCallControlAspect is never used locally

  This, of course, only happens when the setting "Window-->Preferences-->Java--
>Compiler-->Unused code-->Unused or unread private members" is set to Warning.

  These warnings should not be generated as aspects are (almost) never referred 
to anywhere else in the code, so they are not really unused even if references 
do not exist.
Comment 1 Matt Chapman CLA 2004-11-16 10:34:18 EST
The warning comes from the compiler, so passing over to AspectJ. The warning is
given when using "ajc -warn:unusedPrivate" from the command line.
Comment 2 Adrian Colyer CLA 2005-03-23 08:37:28 EST
this would be a nice thing to tidy up in aj5m4
Comment 3 Adrian Colyer CLA 2005-09-01 05:40:05 EDT
now fixed in tree, and will be available in next published AspectJ development
build on the AspectJ download page.