Skip to content

Commit 112b009

Browse files
committed
fix: synchronized singleton getters
1 parent dab9f42 commit 112b009

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

common-tools/cnuphys/swimmer/src/main/java/cnuphys/lund/LundFileSupport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class LundFileSupport {
1010

1111
private LundFileSupport() {}
1212

13-
public static LundFileSupport getInstance() {
13+
public static synchronized LundFileSupport getInstance() {
1414
if (instance == null) {
1515
instance = new LundFileSupport();
1616
}

common-tools/cnuphys/swimmer/src/main/java/cnuphys/lund/LundSupport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ private LundSupport() {
6969
*
7070
* @return the singleton object.
7171
*/
72-
public static LundSupport getInstance() {
72+
public static synchronized LundSupport getInstance() {
7373
if (instance == null) {
7474
instance = new LundSupport();
7575
instance.initStyles();

0 commit comments

Comments
 (0)