cancel
Showing results for 
Search instead for 
Did you mean: 

SPS10 -> SPS11: Hundreds of "import never used" warnings

Former Member
0 Kudos

After updating NW04s from SPS10 to SPS 11, the task list shows hundreds of "import never used" warnings inside the generated Java source.

I can remove these warnings temporarily, but a rebuild will generate the useless imports again.

Is there a better solution than filter the task list?

Regards

Thomas

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Just disable this warning using Window -> Preferences... -> Java -> Compiler -> Errors/Warnings -> Unnecessary Code -> Unused imports -> Ignore

Armin

Former Member
0 Kudos

Hi Armin,

switching off the warning permanenttly is like using a filter.

And an additional disadvantage: I can't see my own unused import statements because the editor will not mark them any longer.

I'd hoped there's a solution to stop the code generator generating the statements.

Regards

Thomas

Former Member
0 Kudos

That's correct. If you like to see these warnings, don't put them off globally.

We attempted to avoid such unused imports in the generated classes but the gains don't really justify the effort.

Future versions of Web Dynpro Java will use annotations in the generated classes to suppress these warnings.

Armin

suresh_krishnamoorthy
Active Contributor
0 Kudos

Hi Thomas,

In NWDS (NetWeaver Developer Studio) you just right click on your code and do Source->Organise Imports . now your warning import should disappear.

Regards, Suresh KB