| Summary: | Unused imports in Java EE plugins | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] Web Tools | Reporter: | Carl Anderson <ccc> | ||||
| Component: | J2EE Standard Tools | Assignee: | Carl Anderson <ccc> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Chuck Bridgham <cbridgha> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | kaloyan | ||||
| Version: | 3.0 | ||||||
| Target Milestone: | 3.0 M6 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | 197531 | ||||||
| Bug Blocks: | |||||||
| Attachments: |
|
||||||
|
Description
Carl Anderson
This may seem like a minor issue, but it actually impacts some adopter's development environments- in order to improve performance and reduce code size, unused imports are marked as errors in the workspace preferences. This means that when they pull in the WTP code to work on a patch for a problem, errors show up. Normally, I wouldn't worry about that, but since we should have fixed these anyway, we should do this now. Also, by setting compiler preferences at a plugin level it ensures that, even if an adopter product has different settings, WTP code that is pulled in will compile with the settings that we need/desire. Furthermore, by setting various items as errors now, it will ensure that this sort of thing does not creep back into WTP. Created attachment 90078 [details]
Add the default compiler prefs & fixes
I had to remove:
org.eclipse.jdt.core.compiler.problem.discouragedReference=error
And I had to remove the unused imports and local variables and private methods.
This hit a lot of code, but other than a bug that was uncovered in JavaEEEMFArchiveAdapterHelper (where the unused local variables needed to be used), the functionality and code paths should remain unchanged. (Which should be obvious, since removing unused code and variables should not effect anything.)
Carl, thanks you for the note and taking care of this. I am perfectly OK with the suggested changes. Please, go on. Committed to HEAD Note- more unused imports had been committed, so there were a few additional classes changed to keep from causing build errors. |