Fix some style issues that will help us out later

These files will have errors later when we run the Google Java Format plugin over their entirety (e.g. a situation where fixed indentation leads to a line that's longer than 100 characters). It's simpler to fix them now so we won't have to fix them later.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=232353791
This commit is contained in:
gbrodman 2019-02-04 13:17:35 -08:00 committed by jianglai
parent a325f0a50b
commit 058ef07e16
5 changed files with 28 additions and 27 deletions

View file

@ -158,22 +158,22 @@ public class RequestAuthenticator {
private AuthResult authenticate(AuthSettings auth, HttpServletRequest req) {
checkAuthConfig(auth);
for (AuthMethod authMethod : auth.methods()) {
AuthResult authResult;
switch (authMethod) {
// App Engine internal authentication, using the queue name header
case INTERNAL: {
// checkAuthConfig will have insured that the user policy is not USER.
AuthResult authResult = appEngineInternalAuthenticationMechanism.authenticate(req);
if (authResult.isAuthenticated()) {
logger.atInfo().log("Authenticated via internal auth: %s", authResult);
return authResult;
}
// App Engine internal authentication, using the queue name header
case INTERNAL:
// checkAuthConfig will have insured that the user policy is not USER.
authResult = appEngineInternalAuthenticationMechanism.authenticate(req);
if (authResult.isAuthenticated()) {
logger.atInfo().log("Authenticated via internal auth: %s", authResult);
return authResult;
}
break;
// API-based user authentication mechanisms, such as OAuth
case API:
// checkAuthConfig will have insured that the user policy is not IGNORED.
for (AuthenticationMechanism authMechanism : apiAuthenticationMechanisms) {
AuthResult authResult = authMechanism.authenticate(req);
authResult = authMechanism.authenticate(req);
if (authResult.isAuthenticated()) {
logger.atInfo().log(
"Authenticated via %s: %s", authMechanism.getClass().getSimpleName(), authResult);
@ -184,7 +184,7 @@ public class RequestAuthenticator {
// Legacy authentication via UserService
case LEGACY:
// checkAuthConfig will have insured that the user policy is not IGNORED.
AuthResult authResult = legacyAuthenticationMechanism.authenticate(req);
authResult = legacyAuthenticationMechanism.authenticate(req);
if (authResult.isAuthenticated()) {
logger.atInfo().log("Authenticated via legacy auth: %s", authResult);
return authResult;

View file

@ -183,15 +183,14 @@ abstract class CreateOrUpdateRegistrarCommand extends MutatingCommand {
@Nullable
@Parameter(
names = "--billing_account_map",
description =
"Registrar Billing Account key-value pairs (formatted as key=value[,key=value...]), "
+ "where key is a currency unit (USD, JPY, etc) and value is the registrar's billing "
+ "account id for that currency. During update, only the pairs that need updating need "
+ "to be provided.",
converter = CurrencyUnitToStringMap.class,
validateWith = CurrencyUnitToStringMap.class
)
names = "--billing_account_map",
description =
"Registrar Billing Account key-value pairs (formatted as key=value[,key=value...]), "
+ "where key is a currency unit (USD, JPY, etc) and value is the registrar's billing "
+ "account id for that currency. During update, only the pairs that need updating "
+ "need to be provided.",
converter = CurrencyUnitToStringMap.class,
validateWith = CurrencyUnitToStringMap.class)
private Map<CurrencyUnit, String> billingAccountMap;
@Nullable

View file

@ -307,8 +307,9 @@ abstract class CreateOrUpdateTldCommand extends MutatingCommand {
if (renewBillingCostTransitions.size() > 1) {
System.err.println(
"----------------------\n"
+ "WARNING: Do not set multiple renew cost transitions until b/20764952 is fixed.\n"
+ "----------------------\n");
+ "WARNING: Do not set multiple renew cost transitions "
+ "until b/20764952 is fixed.\n"
+ "----------------------\n");
}
builder.setRenewBillingCostTransitions(renewBillingCostTransitions);
}

View file

@ -44,10 +44,10 @@ import javax.inject.Named;
/** Command to generate and persist {@link AllocationToken}s. */
@Parameters(
separators = " =",
commandDescription =
"Generates and persists the given number of AllocationTokens, printing each token to stdout."
)
separators = " =",
commandDescription =
"Generates and persists the given number of AllocationTokens, "
+ "printing each token to stdout.")
@NonFinalForTesting
class GenerateAllocationTokensCommand implements CommandWithRemoteApi {

View file

@ -83,8 +83,9 @@ final class UniformRapidSuspensionCommand extends MutatingEppToolCommand {
@Parameter(
names = {"-p", "--locks_to_preserve"},
description = "Comma-delimited set of locks to preserve (only valid with --undo). "
+ "Valid locks: serverDeleteProhibited, serverTransferProhibited, serverUpdateProhibited")
description =
"Comma-delimited set of locks to preserve (only valid with --undo). Valid "
+ "locks: serverDeleteProhibited, serverTransferProhibited, serverUpdateProhibited")
private List<String> locksToPreserve = new ArrayList<>();
@Parameter(