Skip to content

Commit 4b582a9

Browse files
committed
counter
1 parent 42476ff commit 4b582a9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/core/basesyntax/Counter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ public Counter(int value) {
1212
this.value = value;
1313
}
1414

15-
public void decreaseValue() {
15+
public synchronized void decreaseValue() {
1616
logger.info(String.format(MESSAGE,
1717
"Before decrementing", Thread.currentThread().getName(), value));
1818
value--;
1919
logger.info(String.format(MESSAGE,
20-
"After decrementing", Thread.currentThread().getName(), value));
20+
" After decrementing", Thread.currentThread().getName(), value));
2121
}
2222
}

0 commit comments

Comments
 (0)