From 5fb94ebe0fdd3967545a78bf36c5d143a56f4e4e Mon Sep 17 00:00:00 2001 From: Kamidu Sachith Date: Fri, 12 Feb 2016 20:56:30 +0530 Subject: [PATCH] Code refractoring and Formatting --- .../authenticator/backend/oauth/AuthenticatorException.java | 2 -- .../backend/oauth/validator/OAuthValidatorFactory.java | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/components/identity-extensions/backend-oauth-authenticator/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/AuthenticatorException.java b/components/identity-extensions/backend-oauth-authenticator/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/AuthenticatorException.java index 42eafd7888..38cf6b178a 100755 --- a/components/identity-extensions/backend-oauth-authenticator/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/AuthenticatorException.java +++ b/components/identity-extensions/backend-oauth-authenticator/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/AuthenticatorException.java @@ -36,6 +36,4 @@ public class AuthenticatorException extends Exception { public AuthenticatorException(String message, Throwable e) { super(message, e); } - - } diff --git a/components/identity-extensions/backend-oauth-authenticator/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/validator/OAuthValidatorFactory.java b/components/identity-extensions/backend-oauth-authenticator/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/validator/OAuthValidatorFactory.java index 45e89c0223..8e0697e9db 100755 --- a/components/identity-extensions/backend-oauth-authenticator/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/validator/OAuthValidatorFactory.java +++ b/components/identity-extensions/backend-oauth-authenticator/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/validator/OAuthValidatorFactory.java @@ -35,12 +35,13 @@ public class OAuthValidatorFactory { /** * The method check the configuration and provide the appropriate implementation for OAuth2TokenValidator + * * @return OAuth2TokenValidator */ public static OAuth2TokenValidator getValidator() throws IllegalArgumentException { AuthenticatorsConfiguration authenticatorsConfiguration = AuthenticatorsConfiguration.getInstance(); AuthenticatorsConfiguration.AuthenticatorConfig authenticatorConfig = authenticatorsConfiguration. - getAuthenticatorConfig(OauthAuthenticatorConstants.AUTHENTICATOR_NAME); + getAuthenticatorConfig(OauthAuthenticatorConstants.AUTHENTICATOR_NAME); boolean isRemote; String hostUrl; String adminUserName; @@ -51,7 +52,7 @@ public class OAuthValidatorFactory { hostUrl = authenticatorConfig.getParameters().get(AUTHENTICATOR_CONFIG_HOST_URL); adminUserName = authenticatorConfig.getParameters().get(AUTHENTICATOR_CONFIG_ADMIN_USERNAME); adminPassword = authenticatorConfig.getParameters().get(AUTHENTICATOR_CONFIG_ADMIN_PASSWORD); - }else{ + } else { throw new IllegalArgumentException("Configuration parameters need to be defined in Authenticators.xml"); } if (isRemote) {