mirror of
https://github.com/google/nomulus
synced 2026-01-06 21:47:31 +00:00
Remove some cruft in CommandUtilities
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=125127487
This commit is contained in:
@@ -14,9 +14,10 @@
|
||||
|
||||
package google.registry.tools;
|
||||
|
||||
import static google.registry.tools.CommandUtilities.printLineIfNotEmpty;
|
||||
import static google.registry.tools.CommandUtilities.promptForYes;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
import com.beust.jcommander.Parameter;
|
||||
|
||||
/** A {@link Command} that implements a confirmation step before executing. */
|
||||
@@ -64,4 +65,11 @@ public abstract class ConfirmingCommand implements Command {
|
||||
protected String postExecute() throws Exception {
|
||||
return "";
|
||||
}
|
||||
|
||||
/** Prints the provided text with a trailing newline, if text is not null or empty. */
|
||||
private static void printLineIfNotEmpty(String text) {
|
||||
if (!Strings.isNullOrEmpty(text)) {
|
||||
System.out.println(text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user