Skip to content

Commit

Permalink
pr review
Browse files Browse the repository at this point in the history
  • Loading branch information
cdmbr committed Feb 14, 2022
1 parent 81fda77 commit 1091b89
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.function.Function;

Expand Down Expand Up @@ -72,10 +71,9 @@ public Collection<Instance> instances() {
// TODO: get this fixed
return Access.doPrivilegedIOException(() -> {
String nextPageToken = null;
List<Instance> zoneInstances = new LinkedList<>();
List<Instance> zoneInstances = new ArrayList<>();
do {
Compute.Instances.List list = client().instances().list(project, zoneId);
list.setPageToken(nextPageToken);
Compute.Instances.List list = client().instances().list(project, zoneId).setPageToken(nextPageToken);
InstanceList instanceList = list.execute();
nextPageToken = instanceList.getNextPageToken();
if (instanceList.isEmpty() == false && instanceList.getItems() != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static String readGoogleApiJsonResponse(String url) throws IOException {

private static String readJsonResponse(String url, String urlRoot) throws IOException {
// We extract from the url the mock file path we want to use
String mockFileName = Strings.replace(url, urlRoot, "");
String mockFileName = Strings.replace(url, urlRoot, "").replace("?", "%3F");

URL resource = GceMockUtils.class.getResource(mockFileName);
if (resource == null) {
Expand Down

0 comments on commit 1091b89

Please sign in to comment.