在IntelliJ中禁用一行警告 [英] Disable warning in IntelliJ for one line

查看:132
本文介绍了在IntelliJ中禁用一行警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Java代码行,IntelliJ会在其中显示警告。如何在不影响其他行中显示的警告的情况下使该特定行中的警告静音?

I have a Java code line where IntelliJ displays a warning. How do I silence the warning in that particular line, without affecting warnings displayed in other lines?

在这个问题中,与实际警告的内容无关:现在我不是寻求有关如何提高特定Java代码质量的建议,但我想知道如何防止IntelliJ在特定Java源代码行上显示警告。

In this question it's irrelevant what the actual warning is: now I'm not seeking advice on how to improve the quality of a specific piece of Java code, but I want to know in general how to prevent IntelliJ from displaying a warning on a specific Java source line.

推荐答案

主要在IntelliJ中,您可以点击该行并 Alt + Enter ,它将有抑制警告的选项等等。

Mostly in IntelliJ, you can click on the line and Alt+Enter, and it will have options for suppressing the warning, among other things.

这篇关于在IntelliJ中禁用一行警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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