From c94d11f9005b4b94bc4554da55975ed5e2f76163 Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Fri, 16 May 2014 09:49:16 -0700 Subject: [PATCH] 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. --- .../googlecomputeengine/GoogleComputeEngineConstants.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/GoogleComputeEngineConstants.java b/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/GoogleComputeEngineConstants.java index 0bf6b6f515..a5f121182d 100644 --- a/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/GoogleComputeEngineConstants.java +++ b/providers/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"); + } }