mirror of
https://github.com/google/nomulus.git
synced 2025-05-28 11:10:57 +02:00
Refactor WhoisReader.readCommand() method to take a now param
This obviates the need for the use of @AutoFactory. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=149570411
This commit is contained in:
parent
9eddbe2b6e
commit
815dae2749
8 changed files with 23 additions and 49 deletions
|
@ -61,7 +61,7 @@ public class WhoisServer implements Runnable {
|
|||
@Inject Clock clock;
|
||||
@Inject Reader input;
|
||||
@Inject Response response;
|
||||
@Inject WhoisReaderFactory whoisReaderFactory;
|
||||
@Inject WhoisReader whoisReader;
|
||||
@Inject @Config("whoisDisclaimer") String disclaimer;
|
||||
@Inject WhoisMetric.Builder metricBuilder;
|
||||
@Inject WhoisMetrics whoisMetrics;
|
||||
|
@ -72,7 +72,7 @@ public class WhoisServer implements Runnable {
|
|||
String responseText;
|
||||
DateTime now = clock.nowUtc();
|
||||
try {
|
||||
WhoisCommand command = whoisReaderFactory.create(now).readCommand(input);
|
||||
WhoisCommand command = whoisReader.readCommand(input, now);
|
||||
metricBuilder.setCommand(command);
|
||||
WhoisResponseResults results =
|
||||
command.executeQuery(now).getResponse(PREFER_UNICODE, disclaimer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue