Skip to content

Commit a872fac

Browse files
sergii-nosachenkoBuriy88
authored andcommitted
synchronized
1 parent 5adabb4 commit a872fac

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
uses: actions/setup-java@v4
1515
with:
1616
java-version: '17'
17-
distribution: adopt
17+
distribution: 'temurin'
1818
cache: maven
1919
- name: Build with Maven
2020
run: mvn --batch-mode --update-snapshots verify

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ 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--;

0 commit comments

Comments
 (0)