Bug 148219 - Wrong warning is reported
Summary: Wrong warning is reported
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.5.3   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-22 10:05 EDT by Wang Bin CLA
Modified: 2006-08-09 09:14 EDT (History)
0 users

See Also:


Attachments
sceenshot (23.95 KB, image/png)
2006-06-22 10:05 EDT, Wang Bin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wang Bin CLA 2006-06-22 10:05:18 EDT
I used ajdt_1.3.1_for_eclipse_3.1.zip on Eclipse 3.1.2.
Below is my aspectj code.

public aspect MyMessages {
    pointcut getResourceString(String key): args(key, ..) &&
    call (* CommonPlugin.getResourceString(String, ..));

    String around(String key):getResourceString(key) {
    	return key;
    }
}

The warning message is
The parameter key is never read. 
See my screenshot.
Comment 1 Wang Bin CLA 2006-06-22 10:05:41 EDT
Created attachment 45088 [details]
sceenshot
Comment 2 Matt Chapman CLA 2006-08-08 10:49:23 EDT
reproduced with latest dev builds (once the JDT "parameter is never read" option is set to warning). The warning is issued against the pointcut, which doesn't really make much sense for a pointcut. Passing over to the compiler.
Comment 3 Andrew Clement CLA 2006-08-08 11:34:32 EDT
fix committed in AJ tree.
Comment 4 Andrew Clement CLA 2006-08-09 09:14:56 EDT
fix available in AJ.