Making getInstance call synchronized in order to avoid any problems with multiple threads using it

This commit is contained in:
Simon Pamies committed 2013-01-10 10:55:47 +01:00
1 parent ea81c28501
commit c2fb726912
1 file changed
+1 -1
@@ -29,7 +29,7 @@ public class SystemInformationImpl implements SystemInformation {
private long allocated_tcp_connections = -1;
private long used_tcp_connections = -1;
public static SystemInformation getInstance() {
public synchronized static SystemInformation getInstance() {
if (singleton == null)
singleton = new SystemInformationImpl();
return singleton;