Skip to content

Commit 9bb1d20

Browse files
committed
Use correct exception
1 parent 2ef4e4e commit 9bb1d20

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/rank/textsimilarity/TextSimilarityRankBuilder.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import org.elasticsearch.xcontent.XContentBuilder;
2828

2929
import java.io.IOException;
30-
import java.io.UnsupportedEncodingException;
3130
import java.util.List;
3231
import java.util.Objects;
3332

@@ -104,7 +103,7 @@ public void doWriteTo(StreamOutput out) throws IOException {
104103

105104
@Override
106105
public void doXContent(XContentBuilder builder, Params params) throws IOException {
107-
throw new UnsupportedEncodingException("This should not be XContent serialized");
106+
throw new UnsupportedOperationException("This should not be XContent serialized");
108107
}
109108

110109
@Override

0 commit comments

Comments
 (0)