From 2e3967847b4e2327d55316d86d7060ff9e9aad30 Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Wed, 18 Dec 2024 17:02:19 -0600 Subject: [PATCH] removing java 21 syntax --- .../migrate/task/ReindexDataStreamPersistentTaskExecutor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugin/migrate/src/main/java/org/elasticsearch/xpack/migrate/task/ReindexDataStreamPersistentTaskExecutor.java b/x-pack/plugin/migrate/src/main/java/org/elasticsearch/xpack/migrate/task/ReindexDataStreamPersistentTaskExecutor.java index dc8e33bc091e6..a4b892dc8d1a9 100644 --- a/x-pack/plugin/migrate/src/main/java/org/elasticsearch/xpack/migrate/task/ReindexDataStreamPersistentTaskExecutor.java +++ b/x-pack/plugin/migrate/src/main/java/org/elasticsearch/xpack/migrate/task/ReindexDataStreamPersistentTaskExecutor.java @@ -136,8 +136,8 @@ private void maybeProcessNextIndex( } Index index; try { - index = indicesRemaining.removeFirst(); - } catch (NoSuchElementException e) { + index = indicesRemaining.remove(0); + } catch (IndexOutOfBoundsException e) { return; } reindexDataStreamTask.incrementInProgressIndicesCount(index.getName());