From adbcceed289d0d5bb020bcc7bcd38c6664913eb1 Mon Sep 17 00:00:00 2001 From: Emmanuel Hugonnet Date: Fri, 19 Dec 2025 10:54:27 +0100 Subject: [PATCH] fix: InMemoryPushNotificationConfigStore uses wrong pagination token. * Using the 'id' field instead of the 'token' field as the pagination token. Fixes #554 Signed-off-by: Emmanuel Hugonnet --- .../server/tasks/InMemoryPushNotificationConfigStore.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server-common/src/main/java/io/a2a/server/tasks/InMemoryPushNotificationConfigStore.java b/server-common/src/main/java/io/a2a/server/tasks/InMemoryPushNotificationConfigStore.java index b278d32d6..8dfeeebdb 100644 --- a/server-common/src/main/java/io/a2a/server/tasks/InMemoryPushNotificationConfigStore.java +++ b/server-common/src/main/java/io/a2a/server/tasks/InMemoryPushNotificationConfigStore.java @@ -70,16 +70,16 @@ public ListTaskPushNotificationConfigResult getInfo(ListTaskPushNotificationConf if (configs.size() <= params.pageSize()) { return new ListTaskPushNotificationConfigResult(convertPushNotificationConfig(configs, params), null); } - String newToken = configs.get(params.pageSize()).token(); + String newToken = configs.get(params.pageSize()).id(); return new ListTaskPushNotificationConfigResult(convertPushNotificationConfig(configs.subList(0, params.pageSize()), params), newToken); } - private int findFirstIndex(List configs, String token) { + private int findFirstIndex(List configs, String id) { //find first index Iterator iter = configs.iterator(); int index = 0; while (iter.hasNext()) { - if (token.equals(iter.next().token())) { + if (id.equals(iter.next().id())) { return index; } index++;