@Test public void testInputFile_noLogPath() throws Exception { LOG.info("testInputFile_noLogPath()"); expectedException.expect(NullPointerException.class); init(null); inputFile.isReady(); }
@Override public boolean isReady() { if (!isReady) { logFiles = getActualFiles(logPath); if (!ArrayUtils.isEmpty(logFiles) && logFiles[0].isFile()) { if (tail && logFiles.length > 1) { LOG.warn("Found multiple files (" + logFiles.length + ") for the file filter " + filePath + ". Will use only the first one. Using " + logFiles[0].getAbsolutePath()); } LOG.info("File filter " + filePath + " expanded to " + logFiles[0].getAbsolutePath()); isReady = true; } else { LOG.debug(logPath + " file doesn't exist. Ignoring for now"); } } return isReady; }
InputFile extends AbstractInputFile { @Override public boolean isReady() { if (!isReady) { logFiles = getActualFiles(logPath); if (!ArrayUtils.isEmpty(logFiles) && logFiles[0].isFile()) { if (tail && logFiles.length > 1) { LOG.warn("Found multiple files (" + logFiles.length + ") for the file filter " + filePath + ". Will use only the first one. Using " + logFiles[0].getAbsolutePath()); } LOG.info("File filter " + filePath + " expanded to " + logFiles[0].getAbsolutePath()); isReady = true; } else { LOG.debug(logPath + " file doesn't exist. Ignoring for now"); } } return isReady; } }
InputFile extends AbstractInputFile { @Override public boolean isReady() { if (!isReady) { logFiles = getActualFiles(logPath); if (!ArrayUtils.isEmpty(logFiles) && logFiles[0].isFile()) { if (tail && logFiles.length > 1) { LOG.warn("Found multiple files (" + logFiles.length + ") for the file filter " + filePath + ". Will use only the first one. Using " + logFiles[0].getAbsolutePath()); } LOG.info("File filter " + filePath + " expanded to " + logFiles[0].getAbsolutePath()); isReady = true; } else { LOG.debug(logPath + " file doesn't exist. Ignoring for now"); } } return isReady; }  }
InputFile extends AbstractInputFile { @Override public boolean isReady() { if (!isReady) { logFiles = getActualFiles(logPath); if (!ArrayUtils.isEmpty(logFiles) && logFiles[0].isFile()) { if (tail && logFiles.length > 1) { LOG.warn("Found multiple files (" + logFiles.length + ") for the file filter " + filePath + ". Will use only the first one. Using " + logFiles[0].getAbsolutePath()); } LOG.info("File filter " + filePath + " expanded to " + logFiles[0].getAbsolutePath()); isReady = true; } else { LOG.debug(logPath + " file doesn't exist. Ignoring for now"); } } return isReady; }  @Override boolean isReady(); }
InputFile extends AbstractInputFile { @Override public boolean isReady() { if (!isReady) { logFiles = getActualFiles(logPath); if (!ArrayUtils.isEmpty(logFiles) && logFiles[0].isFile()) { if (tail && logFiles.length > 1) { LOG.warn("Found multiple files (" + logFiles.length + ") for the file filter " + filePath + ". Will use only the first one. Using " + logFiles[0].getAbsolutePath()); } LOG.info("File filter " + filePath + " expanded to " + logFiles[0].getAbsolutePath()); isReady = true; } else { LOG.debug(logPath + " file doesn't exist. Ignoring for now"); } } return isReady; }  @Override boolean isReady();  }