OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.tools.findbugs.plugin; | 5 package org.chromium.tools.findbugs.plugin; |
6 | 6 |
7 /** | 7 /** |
8 * This class has synchronized method and is used to test | 8 * This class has synchronized method and is used to test |
9 * SynchronizedMethodDetector. | 9 * SynchronizedMethodDetector. |
10 */ | 10 */ |
11 class SimpleSynchronizedMethod { | 11 class SimpleSynchronizedMethod { |
12 private int i = 0; | 12 private int mCounter = 0; |
13 synchronized void synchronizedMethod() { | 13 |
14 i++; | 14 synchronized void synchronizedMethod() { |
15 } | 15 mCounter++; |
| 16 } |
16 } | 17 } |
OLD | NEW |