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)