mirror of
https://github.com/google/nomulus
synced 2026-02-04 03:52:33 +00:00
Clean up some code quality issues
This removes some qualifiers that aren't necessary (e.g. public/abstract on interfaces, private on enum constructors, final on private methods, static on nested interfaces/enums), uses Java 8 lambdas and features where that's an improvement ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=177182945
This commit is contained in:
@@ -127,16 +127,19 @@ public final class TldFanoutAction implements Runnable {
|
||||
excludes);
|
||||
Multimap<String, String> flowThruParams = filterKeys(params, not(in(CONTROL_PARAMS)));
|
||||
Queue taskQueue = getQueue(queue);
|
||||
String outputPayload = String.format(
|
||||
"OK: Launched the following %d tasks in queue %s\n", tlds.size(), queue);
|
||||
StringBuilder outputPayload =
|
||||
new StringBuilder(
|
||||
String.format("OK: Launched the following %d tasks in queue %s\n", tlds.size(), queue));
|
||||
for (String tld : tlds) {
|
||||
TaskOptions taskOptions = createTaskOptions(tld, flowThruParams);
|
||||
TaskHandle taskHandle = taskEnqueuer.enqueue(taskQueue, taskOptions);
|
||||
outputPayload += String.format(
|
||||
"- Task: %s, tld: %s, endpoint: %s\n", taskHandle.getName(), tld, taskOptions.getUrl());
|
||||
outputPayload.append(
|
||||
String.format(
|
||||
"- Task: %s, tld: %s, endpoint: %s\n",
|
||||
taskHandle.getName(), tld, taskOptions.getUrl()));
|
||||
}
|
||||
response.setContentType(PLAIN_TEXT_UTF_8);
|
||||
response.setPayload(outputPayload);
|
||||
response.setPayload(outputPayload.toString());
|
||||
}
|
||||
|
||||
private TaskOptions createTaskOptions(String tld, Multimap<String, String> params) {
|
||||
|
||||
Reference in New Issue
Block a user