Skip to content

Commit

Permalink
refactor: 불필요한 synchronized 키워드 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
echo724 committed Sep 12, 2023
1 parent 158a7a1 commit fbd1dfd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions study/src/test/java/thread/stage0/SynchronizationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ public synchronized void calculate() {
setSum(getSum() + 1);
}

public synchronized int getSum() {
public int getSum() {
return sum;
}

public synchronized void setSum(int sum) {
public void setSum(int sum) {
this.sum = sum;
}
}
Expand Down

0 comments on commit fbd1dfd

Please sign in to comment.