From 49431a5412c8109ac6e65f86e047099206be4db6 Mon Sep 17 00:00:00 2001 From: Ajay Kannan Date: Mon, 7 Mar 2016 08:54:22 -0800 Subject: [PATCH] Fix javadoc, handle potential null testPermissions response, don't use single letter variable names --- .../resourcemanager/ResourceManager.java | 37 +++++++++++--- .../resourcemanager/ResourceManagerImpl.java | 50 +++++++++++-------- .../testing/LocalResourceManagerHelper.java | 6 +-- .../gcloud/spi/DefaultResourceManagerRpc.java | 4 +- .../google/gcloud/spi/ResourceManagerRpc.java | 2 +- .../ResourceManagerImplTest.java | 3 ++ 6 files changed, 69 insertions(+), 33 deletions(-) diff --git a/gcloud-java-resourcemanager/src/main/java/com/google/gcloud/resourcemanager/ResourceManager.java b/gcloud-java-resourcemanager/src/main/java/com/google/gcloud/resourcemanager/ResourceManager.java index 979de6e95580..6d79faf18862 100644 --- a/gcloud-java-resourcemanager/src/main/java/com/google/gcloud/resourcemanager/ResourceManager.java +++ b/gcloud-java-resourcemanager/src/main/java/com/google/gcloud/resourcemanager/ResourceManager.java @@ -18,6 +18,7 @@ import com.google.common.base.Joiner; import com.google.common.collect.Sets; +import com.google.gcloud.IamPolicy; import com.google.gcloud.Page; import com.google.gcloud.Service; import com.google.gcloud.spi.ResourceManagerRpc; @@ -184,10 +185,12 @@ public enum Permission { SET_BILLING("setBillingAccount"), UNDELETE("undelete"); + private static final String PREFIX = "resourcemanager.projects."; + private final String strValue; Permission(String suffix) { - this.strValue = "resourcemanager.projects." + suffix; + this.strValue = PREFIX + suffix; } String strValue() { @@ -196,7 +199,7 @@ String strValue() { } /** - * Create a new project. + * Creates a new project. * *

Initially, the project resource is owned by its creator exclusively. The creator can later * grant permission to others to read or update the project. Several APIs are activated @@ -307,7 +310,7 @@ String strValue() { * Sets the IAM access control policy for the specified project. Replaces any existing policy. The * following constraints apply: *