|
50 | 50 | @CommandLine.Command(name = "import", description = "Import data into a ScalarDB table") |
51 | 51 | public class ImportCommand extends ImportCommandOptions implements Callable<Integer> { |
52 | 52 |
|
53 | | - private static final Logger logger = LoggerFactory.getLogger(ImportCommand.class); |
| 53 | + private static final Logger logger = LoggerFactory.getLogger(ImportCommand.class); |
54 | 54 |
|
55 | 55 | /** Spec injected by PicoCli */ |
56 | 56 | @Spec CommandSpec spec; |
@@ -284,28 +284,27 @@ private Optional<ControlFile> parseControlFileFromPath(String controlFilePath) { |
284 | 284 | spec.commandLine(), DataLoaderError.INVALID_CONTROL_FILE.buildMessage(controlFilePath)); |
285 | 285 | } |
286 | 286 | } |
287 | | - /** Warns about deprecated options that are no longer used and have been completely ignored. */ |
288 | | - private void warnAboutIgnoredDeprecatedOptions() { |
289 | | - CommandLine.ParseResult parseResult = spec.commandLine().getParseResult(); |
290 | | - boolean hasRawRecordOption = |
291 | | - parseResult.hasMatchedOption(DEPRECATED_LOG_RAW_RECORDS_OPTION) |
292 | | - || parseResult.hasMatchedOption(DEPRECATED_LOG_RAW_RECORDS_OPTION_SHORT); |
| 287 | + /** Warns about deprecated options that are no longer used and have been completely ignored. */ |
| 288 | + private void warnAboutIgnoredDeprecatedOptions() { |
| 289 | + CommandLine.ParseResult parseResult = spec.commandLine().getParseResult(); |
| 290 | + boolean hasRawRecordOption = |
| 291 | + parseResult.hasMatchedOption(DEPRECATED_LOG_RAW_RECORDS_OPTION) |
| 292 | + || parseResult.hasMatchedOption(DEPRECATED_LOG_RAW_RECORDS_OPTION_SHORT); |
293 | 293 |
|
294 | | - if (hasRawRecordOption) { |
295 | | - // Use picocli's ANSI support for colored warning output |
296 | | - CommandLine.Help.Ansi ansi = CommandLine.Help.Ansi.AUTO; |
297 | | - String warning = |
298 | | - ansi.string( |
299 | | - "@|bold,yellow The " |
300 | | - + DEPRECATED_LOG_RAW_RECORDS_OPTION |
301 | | - + " option is deprecated and no longer has any effect. " |
302 | | - + "This option is no longer required because failure records are " |
303 | | - + "always logged by default.|@"); |
| 294 | + if (hasRawRecordOption) { |
| 295 | + // Use picocli's ANSI support for colored warning output |
| 296 | + CommandLine.Help.Ansi ansi = CommandLine.Help.Ansi.AUTO; |
| 297 | + String warning = |
| 298 | + ansi.string( |
| 299 | + "@|bold,yellow The " |
| 300 | + + DEPRECATED_LOG_RAW_RECORDS_OPTION |
| 301 | + + " option is deprecated and no longer has any effect. " |
| 302 | + + "This option is no longer required because failure records are " |
| 303 | + + "always logged by default.|@"); |
304 | 304 |
|
305 | | - logger.warn(warning); |
306 | | - } |
| 305 | + logger.warn(warning); |
307 | 306 | } |
308 | | - |
| 307 | + } |
309 | 308 |
|
310 | 309 | /** |
311 | 310 | * Validates that deprecated and new options are not both specified. |
|
0 commit comments