Commit 0073ab07 authored by izeye's avatar izeye Committed by Stephane Nicoll

Remove unnecessary if statement

parent a48296f5
...@@ -100,16 +100,14 @@ public class ElasticsearchAutoConfiguration implements DisposableBean { ...@@ -100,16 +100,14 @@ public class ElasticsearchAutoConfiguration implements DisposableBean {
if (logger.isInfoEnabled()) { if (logger.isInfoEnabled()) {
logger.info("Closing Elasticsearch client"); logger.info("Closing Elasticsearch client");
} }
if (this.releasable != null) { try {
try { this.releasable.close();
this.releasable.close(); }
} catch (NoSuchMethodError ex) {
catch (NoSuchMethodError ex) { // Earlier versions of Elasticsearch had a different method name
// Earlier versions of Elasticsearch had a different method name ReflectionUtils.invokeMethod(
ReflectionUtils.invokeMethod( ReflectionUtils.findMethod(Releasable.class, "release"),
ReflectionUtils.findMethod(Releasable.class, "release"), this.releasable);
this.releasable);
}
} }
} }
catch (final Exception ex) { catch (final Exception ex) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment