From c3f7a467186d2b0b70bd69c52778b4ac1ae26033 Mon Sep 17 00:00:00 2001 From: anuchan Date: Thu, 28 Apr 2016 12:52:37 -0700 Subject: [PATCH] Fixing UnsupportedOperation exception in PagedList --- .../src/main/java/com/microsoft/azure/PagedList.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java b/azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java index f13aca518532e..f501163ff03e0 100644 --- a/azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java +++ b/azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java @@ -47,7 +47,8 @@ public PagedList() { * @param page the {@link Page} object. */ public PagedList(Page page) { - items = page.getItems(); + this(); + items.addAll(page.getItems()); nextPageLink = page.getNextPageLink(); currentPage = page; }