mirror of
https://github.com/google/nomulus.git
synced 2025-07-20 17:56:08 +02:00
Remove unnecessary generic type arguments
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=175155365
This commit is contained in:
parent
8dcc2d6833
commit
2aa897e698
140 changed files with 355 additions and 465 deletions
|
@ -245,7 +245,7 @@ public final class Modules {
|
|||
// GoogleCredential constructor. We don't yet know the actual scopes to use here, and it
|
||||
// is thus the responsibility of every user of a delegated admin credential to call
|
||||
// createScoped() on it first to get the version with the correct scopes set.
|
||||
.setServiceAccountScopes(ImmutableSet.<String>of())
|
||||
.setServiceAccountScopes(ImmutableSet.of())
|
||||
.setServiceAccountUser(gSuiteAdminAccountEmailAddress)
|
||||
.build();
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ public final class RequestParameters {
|
|||
String stringParam = req.getParameter(name);
|
||||
try {
|
||||
return isNullOrEmpty(stringParam)
|
||||
? Optional.<Integer>empty()
|
||||
? Optional.empty()
|
||||
: Optional.of(Integer.valueOf(stringParam));
|
||||
} catch (NumberFormatException e) {
|
||||
throw new BadRequestException("Expected integer: " + name);
|
||||
|
@ -93,7 +93,7 @@ public final class RequestParameters {
|
|||
/** Returns all GET or POST parameters associated with {@code name}. */
|
||||
public static ImmutableSet<String> extractSetOfParameters(HttpServletRequest req, String name) {
|
||||
String[] parameters = req.getParameterValues(name);
|
||||
return parameters == null ? ImmutableSet.<String>of() : ImmutableSet.copyOf(parameters);
|
||||
return parameters == null ? ImmutableSet.of() : ImmutableSet.copyOf(parameters);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -135,7 +135,7 @@ public final class RequestParameters {
|
|||
HttpServletRequest req, String name) {
|
||||
String stringParam = req.getParameter(name);
|
||||
return isNullOrEmpty(stringParam)
|
||||
? Optional.<Boolean>empty()
|
||||
? Optional.empty()
|
||||
: Optional.of(Boolean.valueOf(stringParam));
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@ public final class RequestParameters {
|
|||
String stringParam = req.getParameter(name);
|
||||
try {
|
||||
return isNullOrEmpty(stringParam)
|
||||
? Optional.<DateTime>empty()
|
||||
? Optional.empty()
|
||||
: Optional.of(DateTime.parse(stringParam));
|
||||
} catch (IllegalArgumentException e) {
|
||||
throw new BadRequestException("Bad ISO 8601 timestamp: " + name);
|
||||
|
@ -198,7 +198,7 @@ public final class RequestParameters {
|
|||
HttpServletRequest req, String name) {
|
||||
String[] stringParams = req.getParameterValues(name);
|
||||
if (stringParams == null) {
|
||||
return ImmutableSet.<DateTime>of();
|
||||
return ImmutableSet.of();
|
||||
}
|
||||
ImmutableSet.Builder<DateTime> datesBuilder = new ImmutableSet.Builder<>();
|
||||
for (String stringParam : stringParams) {
|
||||
|
|
|
@ -30,7 +30,7 @@ public class AuthModule {
|
|||
@Provides
|
||||
ImmutableList<AuthenticationMechanism> provideApiAuthenticationMechanisms(
|
||||
OAuthAuthenticationMechanism oauthAuthenticationMechanism) {
|
||||
return ImmutableList.<AuthenticationMechanism>of(
|
||||
return ImmutableList.of(
|
||||
oauthAuthenticationMechanism);
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public abstract class AuthResult {
|
|||
}
|
||||
|
||||
public static AuthResult create(AuthLevel authLevel) {
|
||||
return new AutoValue_AuthResult(authLevel, Optional.<UserAuthInfo>empty());
|
||||
return new AutoValue_AuthResult(authLevel, Optional.empty());
|
||||
}
|
||||
|
||||
public static AuthResult create(AuthLevel authLevel, @Nullable UserAuthInfo userAuthInfo) {
|
||||
|
|
|
@ -39,7 +39,7 @@ public abstract class UserAuthInfo {
|
|||
|
||||
public static UserAuthInfo create(
|
||||
User user, boolean isUserAdmin) {
|
||||
return new AutoValue_UserAuthInfo(user, isUserAdmin, Optional.<OAuthTokenInfo>empty());
|
||||
return new AutoValue_UserAuthInfo(user, isUserAdmin, Optional.empty());
|
||||
}
|
||||
|
||||
public static UserAuthInfo create(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue