From 914d2ebb41c9ea1dc1ad437338f457e0fdfb4402 Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Mon, 12 Jul 2021 12:38:09 -0400 Subject: [PATCH] chore: fix List all projects example in README (#535) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #530 ☕️ --- java-resourcemanager/.readme-partials.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java-resourcemanager/.readme-partials.yaml b/java-resourcemanager/.readme-partials.yaml index e9dff8a04aef..edfedc5a2c88 100644 --- a/java-resourcemanager/.readme-partials.yaml +++ b/java-resourcemanager/.readme-partials.yaml @@ -84,7 +84,7 @@ custom_content: | Then add the following code to print a list of projects you can view: ```java - Iterator projectIterator = resourceManager.list().iterateAll(); + Iterator projectIterator = resourceManager.list().iterateAll().iterator(); System.out.println("Projects I can view:"); while (projectIterator.hasNext()) { System.out.println(projectIterator.next().getProjectId()); @@ -138,4 +138,4 @@ custom_content: | The third program modifies the IAM policy associated with a project using the read-modify-write pattern. Complete source code can be found at - [ModifyPolicy.java](https://github.com/googleapis/google-cloud-java/blob/master/google-cloud-examples/src/main/java/com/google/cloud/examples/resourcemanager/snippets/ModifyPolicy.java) \ No newline at end of file + [ModifyPolicy.java](https://github.com/googleapis/google-cloud-java/blob/master/google-cloud-examples/src/main/java/com/google/cloud/examples/resourcemanager/snippets/ModifyPolicy.java)