Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unsupported @SuppressWarnings("PMD.DoNotCallSystemExit")

I need to use System.exit(0) in an application. Eclipse has the PMD plugin installed and complains about this line of code. Adding @SuppressWarnings ("PMD.DoNotCallSystemExit") remove that warning but now I get a warning that this SuppressWarnings is unsupported, despite the fact that it works.

Is there a way to resolve this?

like image 222
user342495 Avatar asked Feb 16 '11 14:02

user342495


1 Answers

To get Eclipse to not flag the @SuppressWarnings("PMD") annotation, look under the menu headings Java -> Compiler -> Errors/Warnings -> Annotations -> Unhandled Token in '@SuppressWarnings' and set it to ignore.

Right on the PMD page.

like image 71
user342495 Avatar answered Sep 22 '22 13:09

user342495