Source:
<code>private File getInputFile() { final File inputFile; if (StringUtils.isBlank(filePath)) { <START> inputFile = new File(getDefaultIngestLocation()); <END> printColor(Color.CYAN, String.format("Ingesting from %s\n", inputFile.toString())); } else { inputFile = new File(filePath); } SecurityLogger.audit("Called catalog:ingest command with path : {}", filePath); if (!inputFile.exists()) { printErrorMessage(String.format("File or directory [%s] must exist.", filePath)); console.println("If the file does indeed exist, try putting the path in quotes."); return null; } if (includeContent && !FilenameUtils.isExtension(filePath, "zip")) { console.printf("File %s must be a zip file.", filePath); return null; } if (deprecatedBatchSize != DEFAULT_BATCH_SIZE) { printErrorMessage( "Batch size positional argument is DEPRECATED, please use --batchsize option instead."); batchSize = deprecatedBatchSize; } if (batchSize <= 0) { printErrorMessage( String.format( "A batch size of [%d] was supplied. Batch size must be greater than 0.", batchSize)); return null; } if (StringUtils.isNotEmpty(failedDir)) { failedIngestDirectory = new File(failedDir); if (!verifyFailedIngestDirectory()) { return null; } if (batchSize != DEFAULT_BATCH_SIZE) { console.printf( "WARNING: An ingest failure directory was supplied in addition to a batch " + "size of %d. When using an ingest failure directory, the batch " + "size must be 1. Setting batch size to 1.%n", batchSize); } batchSize = 1; } if (!SERIALIZED_OBJECT_ID.matches(transformerId)) { transformer = getTransformer(); if (!transformer.isPresent()) { console.println(transformerId + " is an invalid input transformer."); return null; } } return inputFile; }</code><technical_language>if system property is set get empty string back</technical_language>

Target:
private File getInputFile() { final File inputFile; if (StringUtils.isBlank(filePath)) { inputFile = getDefaultIngestLocation(); if (!inputFile.exists()) { printErrorMessage("No file or directory provided and no default directory exists."); console.println("Provide file or directory as an argument to the command."); return null; } printColor(Color.CYAN, String.format("Ingesting from %s\n", inputFile.toString())); } else { inputFile = new File(filePath); } SecurityLogger.audit("Called catalog:ingest command with path : {}", filePath); if (!inputFile.exists()) { printErrorMessage(String.format("File or directory [%s] must exist.", filePath)); console.println("If the file does indeed exist, try putting the path in quotes."); return null; } if (includeContent && !FilenameUtils.isExtension(filePath, "zip")) { console.printf("File %s must be a zip file.", filePath); return null; } if (deprecatedBatchSize != DEFAULT_BATCH_SIZE) { printErrorMessage( "Batch size positional argument is DEPRECATED, please use --batchsize option instead."); batchSize = deprecatedBatchSize; } if (batchSize <= 0) { printErrorMessage( String.format( "A batch size of [%d] was supplied. Batch size must be greater than 0.", batchSize)); return null; } if (StringUtils.isNotEmpty(failedDir)) { failedIngestDirectory = new File(failedDir); if (!verifyFailedIngestDirectory()) { return null; } if (batchSize != DEFAULT_BATCH_SIZE) { console.printf( "WARNING: An ingest failure directory was supplied in addition to a batch " + "size of %d. When using an ingest failure directory, the batch " + "size must be 1. Setting batch size to 1.%n", batchSize); } batchSize = 1; } if (!SERIALIZED_OBJECT_ID.matches(transformerId)) { transformer = getTransformer(); if (!transformer.isPresent()) { console.println(transformerId + " is an invalid input transformer."); return null; } } return inputFile; }