mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-22 00:29:01 +00:00
Remove unnecessary if statement
This commit is contained in:
+8
-10
@@ -100,16 +100,14 @@ public class ElasticsearchAutoConfiguration implements DisposableBean {
|
||||
if (logger.isInfoEnabled()) {
|
||||
logger.info("Closing Elasticsearch client");
|
||||
}
|
||||
if (this.releasable != null) {
|
||||
try {
|
||||
this.releasable.close();
|
||||
}
|
||||
catch (NoSuchMethodError ex) {
|
||||
// Earlier versions of Elasticsearch had a different method name
|
||||
ReflectionUtils.invokeMethod(
|
||||
ReflectionUtils.findMethod(Releasable.class, "release"),
|
||||
this.releasable);
|
||||
}
|
||||
try {
|
||||
this.releasable.close();
|
||||
}
|
||||
catch (NoSuchMethodError ex) {
|
||||
// Earlier versions of Elasticsearch had a different method name
|
||||
ReflectionUtils.invokeMethod(
|
||||
ReflectionUtils.findMethod(Releasable.class, "release"),
|
||||
this.releasable);
|
||||
}
|
||||
}
|
||||
catch (final Exception ex) {
|
||||
|
||||
Reference in New Issue
Block a user