From dd49b4613a7e84c5133b8b31119a96c06d6bb1ff Mon Sep 17 00:00:00 2001 From: elasticsearchmachine Date: Fri, 13 Dec 2024 21:25:24 +0000 Subject: [PATCH] [CI] Auto commit changes from spotless --- .../org/elasticsearch/ElasticsearchStatusException.java | 8 ++++---- .../src/main/java/org/elasticsearch/ExceptionsHelper.java | 6 ++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/ElasticsearchStatusException.java b/server/src/main/java/org/elasticsearch/ElasticsearchStatusException.java index 91e645e78a0fe..bbc9fa89ce110 100644 --- a/server/src/main/java/org/elasticsearch/ElasticsearchStatusException.java +++ b/server/src/main/java/org/elasticsearch/ElasticsearchStatusException.java @@ -26,8 +26,8 @@ public class ElasticsearchStatusException extends ElasticsearchException { * Build the exception with a specific status and cause. */ public ElasticsearchStatusException(String msg, RestStatus status, Throwable cause, Object... args) { - super(msg, cause, args); - this.status = status; + super(msg, cause, args); + this.status = status; } /** @@ -47,12 +47,12 @@ public ElasticsearchStatusException(StreamInput in) throws IOException { @Override protected void writeTo(StreamOutput out, Writer nestedExceptionsWriter) throws IOException { - super.writeTo(out, nestedExceptionsWriter); + super.writeTo(out, nestedExceptionsWriter); RestStatus.writeTo(out, status); } @Override public final RestStatus status() { - return status; + return status; } } diff --git a/server/src/main/java/org/elasticsearch/ExceptionsHelper.java b/server/src/main/java/org/elasticsearch/ExceptionsHelper.java index 106a07fcf865c..2b3011df634cc 100644 --- a/server/src/main/java/org/elasticsearch/ExceptionsHelper.java +++ b/server/src/main/java/org/elasticsearch/ExceptionsHelper.java @@ -13,7 +13,6 @@ import org.apache.logging.log4j.Logger; import org.apache.lucene.index.CorruptIndexException; import org.apache.lucene.index.IndexFormatTooNewException; - import org.apache.lucene.index.IndexFormatTooOldException; import org.elasticsearch.action.ShardOperationFailedException; import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException; import org.elasticsearch.core.Nullable; @@ -46,9 +45,8 @@ public final class ExceptionsHelper { private static final Logger logger = LogManager.getLogger(ExceptionsHelper.class); public static RuntimeException convertToRuntime(Exception e) { - if (e instanceof RuntimeException) - { - return (RuntimeException) e; + if (e instanceof RuntimeException) { + return (RuntimeException) e; } return new ElasticsearchException(e); }