minor check added

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/social-networking/social-data-search-client@130209 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-07-09 20:32:56 +00:00
parent fcde545ef5
commit ab2ee83812
1 changed files with 4 additions and 3 deletions

View File

@ -181,12 +181,13 @@ public class ElasticSearchClientImpl implements ElasticSearchClientInterface{
return response.isFound(); return response.isFound();
} }
@Override @Override
protected void finalize() throws Throwable { protected void finalize() throws Throwable {
super.finalize(); super.finalize();
_log.info("Called finalize.. closing connection to elasticsearch"); _log.info("Called finalize.. closing connection to elasticsearch");
client.close(); if(client != null)
client.close();
} }
} }