We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 42476ff commit 4b582a9Copy full SHA for 4b582a9
1 file changed
src/main/java/core/basesyntax/Counter.java
@@ -12,11 +12,11 @@ public Counter(int value) {
12
this.value = value;
13
}
14
15
- public void decreaseValue() {
+ public synchronized void decreaseValue() {
16
logger.info(String.format(MESSAGE,
17
"Before decrementing", Thread.currentThread().getName(), value));
18
value--;
19
20
- "After decrementing", Thread.currentThread().getName(), value));
+ " After decrementing", Thread.currentThread().getName(), value));
21
22
0 commit comments