<pre id="vvttv"><mark id="vvttv"><progress id="vvttv"></progress></mark></pre>
    <pre id="vvttv"></pre>

      <p id="vvttv"></p>

          <p id="vvttv"></p>

                <p id="vvttv"></p>

                <pre id="vvttv"><cite id="vvttv"><progress id="vvttv"></progress></cite></pre>

                  <output id="vvttv"><dfn id="vvttv"><th id="vvttv"></th></dfn></output>

                    <p id="vvttv"></p>

                    Missing Check for Null Parameter

                    ABSTRACT

                    函數必須檢查其參數是否為 null,當前函數違反了這一規定。

                    EXPLANATION

                    Java 標準指出,實現 Object.equals()Comparable.compareTo()Comparator.compare() 方法時,如果其參數為 null,則必須返回一個指定值。不遵守該規定可能會導致發生意外的行為。

                    例 1:以下代碼實現了 equals() 方法,但沒有檢查參數是否為 null。


                    public boolean equals(Object object)
                    {
                    return (toString().equals(object.toString()));
                    }

                    REFERENCES

                    [1] Standards Mapping - Common Weakness Enumeration - (CWE) CWE ID 398


                    Copyright 2013 Fortify Software - All rights reserved.
                    (Generated from version 2013.1.1.0008 of the Fortify Secure Coding Rulepacks)
                    desc.controlflow.java.missing_check_for_null_parameter

                      <pre id="vvttv"><mark id="vvttv"><progress id="vvttv"></progress></mark></pre>
                      <pre id="vvttv"></pre>

                        <p id="vvttv"></p>

                            <p id="vvttv"></p>

                                  <p id="vvttv"></p>

                                  <pre id="vvttv"><cite id="vvttv"><progress id="vvttv"></progress></cite></pre>

                                    <output id="vvttv"><dfn id="vvttv"><th id="vvttv"></th></dfn></output>

                                      <p id="vvttv"></p>

                                      这里只有精品视频