From 1e48a1daeae90b8cc5b08dec3578f58c5c30e28a 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. --- .../src/main/java/org/jclouds/oauth/v2/OAuthConstants.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apis/oauth/src/main/java/org/jclouds/oauth/v2/OAuthConstants.java b/apis/oauth/src/main/java/org/jclouds/oauth/v2/OAuthConstants.java index fad18bbad4..d3953f36c3 100644 --- a/apis/oauth/src/main/java/org/jclouds/oauth/v2/OAuthConstants.java +++ b/apis/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 form */ public static final String ADDITIONAL_CLAIMS = "jclouds.oauth.additional-claims"; + + private OAuthConstants() { + throw new AssertionError("intentionally unimplemented"); + } }