Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
680 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...