不支持@SuppressWarnings(“PMD.DoNotCallSystemExit”) [英] Unsupported @SuppressWarnings ( "PMD.DoNotCallSystemExit" )

查看:807
本文介绍了不支持@SuppressWarnings(“PMD.DoNotCallSystemExit”)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在应用程序中使用System.exit(0)。 Eclipse安装了PMD插件,并抱怨这一行代码。 Addind @SuppressWarnings(PMD.DoNotCallSystemExit)删除该警告,但现在我收到一个警告,这个SuppressWarnings是不受支持,尽管事实上它是有效的。

I need to use System.exit(0) in an application. Eclipse has the PMD plugin installed and complains about this line of code. Addind @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?

thx

推荐答案

要使Eclipse不标示 @SuppressWarnings(PMD)注释,请查看菜单标题下的Java - >编译器 - >错误/警告 - >注释 - >@SuppressWarnings中的未处理令牌,并将其设置为忽略。

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.

PMD 页面。

抱歉找不到正确的。

这篇关于不支持@SuppressWarnings(“PMD.DoNotCallSystemExit”)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆