| Summary: | Contradicting warnings in AspectJ project. | ||
|---|---|---|---|
| Product: | [Tools] AJDT | Reporter: | Andy Belsky <andy> |
| Component: | UI | Assignee: | AJDT-inbox <AJDT-inbox> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | aclement, andrew.eisenberg, andy |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
My Eclipse build ID is I20110613-1736, AspectJ plug-in version: Version: 2.1.3.e37x-20110628-1900 AspectJ version: 1.6.12.20110613132200 When you add the SuppressWarnings we can see the entry in the problems view goes away. The error remaining in the editor is a reconciling error - that means this is likely to be an AJDT issue. Hmm...not able to reproduce this. For me, the AJ behavior mirrors the Java behavior. There is no warning when @SuppressWarnings("unused") is commented, and there is a warning when uncommented.
Andy Clement, are you able to reproduce?
Andy Belsky, what version of AJDT are you running? Have you tried updating to the latest snapshot?
On the latest dev build I don't see the warning about the method being unused when there is no suppression annotation. it is possible the recent compiler update has slightly changed (fixed) things here. Thanks for getting back to me on this. |
Build Identifier: The following class always produces a warning, both with SuppressWarnings or without. --- MyClass.java --- class MyClass { //@SuppressWarnings("unused") private native void foo(); } --- MyClass.java --- Reproducible: Always Steps to Reproduce: 1. Create AspectJ Java project (in simple Java project, this cannot be reproduced). 2. Add class: --- MyClass.java --- class MyClass { private native void foo(); } --- MyClass.java --- 2.1. It produces a warning: "The method foo() from the type MyClass is never used locally" 3. Alright, add @SuppressWarnings: --- MyClass.java --- class MyClass { @SuppressWarnings("unused") private native void foo(); } --- MyClass.java --- 3.1. It complains again: Unnecesary @SuppressWarnings("unused")