Skip to content

Commit 08f1b96

Browse files
committed
Clean up the tmc-core singleton implementaion
1 parent cff37f5 commit 08f1b96

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tmc-plugin/src/fi/helsinki/cs/tmc/model/TmcCoreSingleton.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
public class TmcCoreSingleton {
77

8-
private static TmcCore defaultInstance;
9-
8+
private static final TmcCore defaultInstance = new TmcCore(NbTmcSettings.getDefault());
9+
10+
/**
11+
* Returns singleton instance of the {@link TmcCore}.
12+
*/
1013
public static TmcCore getInstance() {
11-
if (defaultInstance == null) {
12-
defaultInstance = new TmcCore(NbTmcSettings.getDefault());
13-
}
1414
return defaultInstance;
1515
}
16-
}
16+
}

0 commit comments

Comments
 (0)