PrashantBhanage commented on code in PR #13564:
URL: https://github.com/apache/cloudstack/pull/13564#discussion_r3543084901


##########
plugins/user-authenticators/oauth2/src/main/java/org/apache/cloudstack/oauth2/google/GoogleOAuth2Provider.java:
##########


Review Comment:
   Minor code quality cleanup: Since this is the Google provider plugin, let's 
rename this variable to keep things accurate.
   
   ```suggestion
           OauthProviderVO googleProvider = 
_oauthProviderDao.findByProvider(getName());
           String clientId = googleProvider.getClientId();
           String secret = googleProvider.getSecretKey();
           String redirectURI = googleProvider.getRedirectUri();



##########
plugins/user-authenticators/oauth2/src/main/java/org/apache/cloudstack/oauth2/google/GoogleOAuth2Provider.java:
##########


Review Comment:
   Using a `+` inside `String.format` here will cause a 
`MissingFormatArgumentException` at runtime. Let's fix the syntax to use a 
comma and pass `e` to preserve the stack trace.
   
   ```suggestion
               throw new CloudRuntimeException(String.format("Failed to fetch 
the email address with the provided secret: %s", e.getMessage()), e);



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to