Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Volodymyr-Mykychak committed Sep 15, 2023
1 parent ea9bb2d commit 5ed5449
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Set up JDK 17
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '17'
java-version: '11'
distribution: 'adopt'
cache: maven
- name: Build with Maven
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/core/basesyntax/MyThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ public MyThread(Counter counter, String name) {

@Override
public void run() {
counter.decreaseValue();
synchronized (counter) {
counter.decreaseValue();
}
}
}

0 comments on commit 5ed5449

Please sign in to comment.