Skip to content

Commit

Permalink
[CI] Auto commit changes from spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticsearchmachine committed Dec 13, 2024
1 parent 5f13277 commit dd49b46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand All @@ -47,12 +47,12 @@ public ElasticsearchStatusException(StreamInput in) throws IOException {

@Override
protected void writeTo(StreamOutput out, Writer<Throwable> nestedExceptionsWriter) throws IOException {
super.writeTo(out, nestedExceptionsWriter);
super.writeTo(out, nestedExceptionsWriter);
RestStatus.writeTo(out, status);
}

@Override
public final RestStatus status() {
return status;
return status;
}
}
6 changes: 2 additions & 4 deletions server/src/main/java/org/elasticsearch/ExceptionsHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit dd49b46

Please sign in to comment.