Skip to content

Commit

Permalink
Throw UnsupportedOperationException in unused methods (#15446)
Browse files Browse the repository at this point in the history
These methods infinitely recurse as currently implemented. This change
makes them throw UnsupportedOperationException similar to many other
methods in this class.

Signed-off-by: Andrew Ross <andrross@amazon.com>
(cherry picked from commit 20ebe6e)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Aug 27, 2024
1 parent e80c06e commit 3cd2bdd
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,13 @@ public CacheHelper getReaderCacheHelper() {
}

@Override
public FloatVectorValues getFloatVectorValues(String field) throws IOException {
return getFloatVectorValues(field);
public FloatVectorValues getFloatVectorValues(String field) {
throw new UnsupportedOperationException();

Check warning on line 268 in server/src/main/java/org/opensearch/index/engine/TranslogLeafReader.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/org/opensearch/index/engine/TranslogLeafReader.java#L268

Added line #L268 was not covered by tests
}

@Override
public ByteVectorValues getByteVectorValues(String field) throws IOException {
return getByteVectorValues(field);
public ByteVectorValues getByteVectorValues(String field) {
throw new UnsupportedOperationException();

Check warning on line 273 in server/src/main/java/org/opensearch/index/engine/TranslogLeafReader.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/org/opensearch/index/engine/TranslogLeafReader.java#L273

Added line #L273 was not covered by tests
}

@Override
Expand Down

0 comments on commit 3cd2bdd

Please sign in to comment.