mirror of
https://github.com/google/nomulus
synced 2026-01-11 08:20:27 +00:00
Make lock index parameters non-optional
The optional code has been around for a while, we can get rid of it now. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=192344612
This commit is contained in:
@@ -24,7 +24,7 @@ import static google.registry.dns.PublishDnsUpdatesAction.PARAM_NUM_PUBLISH_LOCK
|
||||
import static google.registry.dns.PublishDnsUpdatesAction.PARAM_PUBLISH_TASK_ENQUEUED;
|
||||
import static google.registry.dns.PublishDnsUpdatesAction.PARAM_REFRESH_REQUEST_CREATED;
|
||||
import static google.registry.request.RequestParameters.extractEnumParameter;
|
||||
import static google.registry.request.RequestParameters.extractOptionalIntParameter;
|
||||
import static google.registry.request.RequestParameters.extractIntParameter;
|
||||
import static google.registry.request.RequestParameters.extractRequiredParameter;
|
||||
import static google.registry.request.RequestParameters.extractSetOfParameters;
|
||||
|
||||
@@ -96,15 +96,13 @@ public abstract class DnsModule {
|
||||
@Provides
|
||||
@Parameter(PARAM_LOCK_INDEX)
|
||||
static int provideLockIndex(HttpServletRequest req) {
|
||||
// TODO(b/72150053): Make non-optional once this cl has reached production for an hour
|
||||
return extractOptionalIntParameter(req, PARAM_LOCK_INDEX).orElse(1);
|
||||
return extractIntParameter(req, PARAM_LOCK_INDEX);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Parameter(PARAM_NUM_PUBLISH_LOCKS)
|
||||
static int provideMaxNumLocks(HttpServletRequest req) {
|
||||
// TODO(b/72150053): Make non-optional once this cl has reached production for an hour
|
||||
return extractOptionalIntParameter(req, PARAM_NUM_PUBLISH_LOCKS).orElse(1);
|
||||
return extractIntParameter(req, PARAM_NUM_PUBLISH_LOCKS);
|
||||
}
|
||||
|
||||
@Provides
|
||||
|
||||
Reference in New Issue
Block a user