forked from netty/netty
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[netty#2675] Replace synchronization performed on util.concurrent ins…
…tance in TrafficCounter Motivation: Message from FindBugs: This method performs synchronization an object that is an instance of a class from the java.util.concurrent package (or its subclasses). Instances of these classes have their own concurrency control mechanisms that are orthogonal to the synchronization provided by the Java keyword synchronized. For example, synchronizing on an AtomicBoolean will not prevent other threads from modifying the AtomicBoolean. Such code may be correct, but should be carefully reviewed and documented, and may confuse people who have to maintain the code at a later date. Modification: Use synchronized(this) Result: Less confusing code
- Loading branch information
Norman Maurer
committed
Jul 21, 2014
1 parent
6d0233d
commit e258919
Showing
1 changed file
with
32 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters