<span id="7ztzv"></span>
<sub id="7ztzv"></sub>

<span id="7ztzv"></span><form id="7ztzv"></form>

<span id="7ztzv"></span>

        <address id="7ztzv"></address>

            Poor Style: Empty Synchronized Block

            ABSTRACT

            若同步代碼塊中不包含指令,它不能起到預期的效果。

            EXPLANATION

            Java 中的同步處理是一個非常棘手的問題。一個 empty synchronized block 通常只標志程序員正在處理同步問題,但還沒有達到預期的結果。

            例:


            synchronized(this) { }

            REFERENCES

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


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

            <span id="7ztzv"></span>
            <sub id="7ztzv"></sub>

            <span id="7ztzv"></span><form id="7ztzv"></form>

            <span id="7ztzv"></span>

                  <address id="7ztzv"></address>

                      亚洲欧美在线