Skip to content

Commit

Permalink
chore: fix List all projects example in README (googleapis#535)
Browse files Browse the repository at this point in the history
Fixes googleapis#530  ☕️
  • Loading branch information
Neenu1995 authored Jul 12, 2021
1 parent 57d7cd7 commit 914d2eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions java-resourcemanager/.readme-partials.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ custom_content: |
Then add the following code to print a list of projects you can view:
```java
Iterator<Project> projectIterator = resourceManager.list().iterateAll();
Iterator<Project> projectIterator = resourceManager.list().iterateAll().iterator();
System.out.println("Projects I can view:");
while (projectIterator.hasNext()) {
System.out.println(projectIterator.next().getProjectId());
Expand Down Expand Up @@ -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)
[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)

0 comments on commit 914d2eb

Please sign in to comment.