<legend id='UFFYZ'><style id='UFFYZ'><dir id='UFFYZ'><q id='UFFYZ'></q></dir></style></legend>
      • <bdo id='UFFYZ'></bdo><ul id='UFFYZ'></ul>
      1. <small id='UFFYZ'></small><noframes id='UFFYZ'>

        <tfoot id='UFFYZ'></tfoot>
        <i id='UFFYZ'><tr id='UFFYZ'><dt id='UFFYZ'><q id='UFFYZ'><span id='UFFYZ'><b id='UFFYZ'><form id='UFFYZ'><ins id='UFFYZ'></ins><ul id='UFFYZ'></ul><sub id='UFFYZ'></sub></form><legend id='UFFYZ'></legend><bdo id='UFFYZ'><pre id='UFFYZ'><center id='UFFYZ'></center></pre></bdo></b><th id='UFFYZ'></th></span></q></dt></tr></i><div id='UFFYZ'><tfoot id='UFFYZ'></tfoot><dl id='UFFYZ'><fieldset id='UFFYZ'></fieldset></dl></div>

        如何抑制特定函数的 Java 编译器警告

        How to suppress Java compiler warnings for specific functions(如何抑制特定函数的 Java 编译器警告)
        1. <legend id='53gGC'><style id='53gGC'><dir id='53gGC'><q id='53gGC'></q></dir></style></legend>
            • <bdo id='53gGC'></bdo><ul id='53gGC'></ul>
            • <i id='53gGC'><tr id='53gGC'><dt id='53gGC'><q id='53gGC'><span id='53gGC'><b id='53gGC'><form id='53gGC'><ins id='53gGC'></ins><ul id='53gGC'></ul><sub id='53gGC'></sub></form><legend id='53gGC'></legend><bdo id='53gGC'><pre id='53gGC'><center id='53gGC'></center></pre></bdo></b><th id='53gGC'></th></span></q></dt></tr></i><div id='53gGC'><tfoot id='53gGC'></tfoot><dl id='53gGC'><fieldset id='53gGC'></fieldset></dl></div>

                <small id='53gGC'></small><noframes id='53gGC'>

                    <tbody id='53gGC'></tbody>
                  <tfoot id='53gGC'></tfoot>
                  本文介绍了如何抑制特定函数的 Java 编译器警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  We are always taught to make sure we use a break in switch statements to avoid fall-through.

                  The Java compiler warns about these situations to help us not make trivial (but drastic) errors.

                  I have, however, used case fall-through as a feature (we don't have to get into it here, but it provides a very elegant solution).

                  However the compiler spits out massive amounts of warnings that may obscure warnings that I need to know about. I know how I can change the compiler to ignore ALL fall-through warnings, but I would like to implement this on a method-by-method basis to avoid missing a place where I did not intend for fall-through to happen.

                  Any Ideas?

                  解决方案

                  If you really, really must do this, and you are sure you are not making a mistake, check out the @SuppressWarnings annotation. I suppose in your case you need

                  @SuppressWarnings("fallthrough")
                  

                  这篇关于如何抑制特定函数的 Java 编译器警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)
                    <bdo id='nzMOG'></bdo><ul id='nzMOG'></ul>
                      <i id='nzMOG'><tr id='nzMOG'><dt id='nzMOG'><q id='nzMOG'><span id='nzMOG'><b id='nzMOG'><form id='nzMOG'><ins id='nzMOG'></ins><ul id='nzMOG'></ul><sub id='nzMOG'></sub></form><legend id='nzMOG'></legend><bdo id='nzMOG'><pre id='nzMOG'><center id='nzMOG'></center></pre></bdo></b><th id='nzMOG'></th></span></q></dt></tr></i><div id='nzMOG'><tfoot id='nzMOG'></tfoot><dl id='nzMOG'><fieldset id='nzMOG'></fieldset></dl></div>
                      <tfoot id='nzMOG'></tfoot>

                          <tbody id='nzMOG'></tbody>

                        <legend id='nzMOG'><style id='nzMOG'><dir id='nzMOG'><q id='nzMOG'></q></dir></style></legend>

                          <small id='nzMOG'></small><noframes id='nzMOG'>