Repository: jclouds-labs-google Updated Branches: refs/heads/master 09c4fb153 -> 738009aef
Make constants final classes instead of interfaces This commit prohibits implementation of the empty interface and instantiation of the class. Refer to _Effective Java_ item 19 for more background. Project: http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/repo Commit: http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/commit/738009ae Tree: http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/tree/738009ae Diff: http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/diff/738009ae Branch: refs/heads/master Commit: 738009aeffa0ffd7a21e80780d11a8c5c65ab3f7 Parents: 09c4fb1 Author: Andrew Gaul <[email protected]> Authored: Fri May 16 09:49:16 2014 -0700 Committer: Andrew Gaul <[email protected]> Committed: Fri May 16 09:49:16 2014 -0700 ---------------------------------------------------------------------- .../googlecomputeengine/GoogleComputeEngineConstants.java | 6 +++++- oauth/src/main/java/org/jclouds/oauth/v2/OAuthConstants.java | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/738009ae/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/GoogleComputeEngineConstants.java ---------------------------------------------------------------------- diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/GoogleComputeEngineConstants.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/GoogleComputeEngineConstants.java index 0bf6b6f..a5f1211 100644 --- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/GoogleComputeEngineConstants.java +++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/GoogleComputeEngineConstants.java @@ -25,7 +25,7 @@ import com.google.common.annotations.Beta; /** * @author David Alves */ -public interface GoogleComputeEngineConstants { +public final class GoogleComputeEngineConstants { public static final String GCE_PROVIDER_NAME = "google-compute-engine"; @@ -77,4 +77,8 @@ public interface GoogleComputeEngineConstants { * The suffix we append to auto-created boot disk names. */ public static final String GCE_BOOT_DISK_SUFFIX = "boot-disk"; + + private GoogleComputeEngineConstants() { + throw new AssertionError("intentionally unimplemented"); + } } http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/738009ae/oauth/src/main/java/org/jclouds/oauth/v2/OAuthConstants.java ---------------------------------------------------------------------- diff --git a/oauth/src/main/java/org/jclouds/oauth/v2/OAuthConstants.java b/oauth/src/main/java/org/jclouds/oauth/v2/OAuthConstants.java index fad18bb..d3953f3 100644 --- a/oauth/src/main/java/org/jclouds/oauth/v2/OAuthConstants.java +++ b/oauth/src/main/java/org/jclouds/oauth/v2/OAuthConstants.java @@ -25,7 +25,7 @@ import java.util.Map; * * @author David Alves */ -public class OAuthConstants { +public final class OAuthConstants { /** * Selected algorithm when a signature or mac isn't required. @@ -73,4 +73,8 @@ public class OAuthConstants { * The (optional) set of additional claims to use, provided in Map<String,String> form */ public static final String ADDITIONAL_CLAIMS = "jclouds.oauth.additional-claims"; + + private OAuthConstants() { + throw new AssertionError("intentionally unimplemented"); + } }
