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.
This commit is contained in:
Andrew Gaul 2014-05-16 09:49:16 -07:00
parent e2e61c4885
commit 1e48a1daea
1 changed files with 5 additions and 1 deletions

View File

@ -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");
}
}