<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>

                    Immutable Classes: Non-final Fields

                    ABSTRACT

                    被注釋為不可變,但字段 并非 final

                    EXPLANATION

                    此類帶有來自 JCIP 注釋包的“不可變”注釋。非最終字段允許更改值,從而違反了類的不可變性。

                    例 1:不可變最終類的下列代碼錯誤地將字段聲明為 public 和非 final


                    @Immutable
                    public class ImmutableInteger {
                    public int value;

                    }

                    REFERENCES

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

                    [2] B. Goetz Java Concurrency in Practice.Chapter 3:Sharing Objects Guidelines

                    [3] Package net.jcip.annotations Specification


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

                      <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>

                                      这里只有精品视频