@Test(expected = IllegalStateException.class) public void testHandlingOfConfigurationRetrievalFailure() throws Exception { withInvalidConfigurationQuerySyntax(); resolveLogFiles(); }
Collection<File> resolveLogFiles() throws IOException { File logDir = getLogfileDirectory(); Collection<File> logFiles = new TreeSet<>((o1, o2) -> o1.getPath().compareToIgnoreCase(o2.getPath())); if (logDir == null) { logDir = new File(this.slingHomeDirectory, "logs"); } if (logDir.exists() && logDir.isDirectory()) { logFiles.addAll(listFiles(logDir, LOGFILE_FILTER, TrueFileFilter.INSTANCE)); } for (File logFile : resolveFactoryConfiguredLogFiles()) { if (!logFile.getParentFile().getAbsolutePath().startsWith(logDir.getAbsolutePath())) { logFiles.addAll(listFiles(logFile.getParentFile(), LOGFILE_FILTER, TrueFileFilter.INSTANCE)); } } return logFiles; }
LogFiles { Collection<File> resolveLogFiles() throws IOException { File logDir = getLogfileDirectory(); Collection<File> logFiles = new TreeSet<>((o1, o2) -> o1.getPath().compareToIgnoreCase(o2.getPath())); if (logDir == null) { logDir = new File(this.slingHomeDirectory, "logs"); } if (logDir.exists() && logDir.isDirectory()) { logFiles.addAll(listFiles(logDir, LOGFILE_FILTER, TrueFileFilter.INSTANCE)); } for (File logFile : resolveFactoryConfiguredLogFiles()) { if (!logFile.getParentFile().getAbsolutePath().startsWith(logDir.getAbsolutePath())) { logFiles.addAll(listFiles(logFile.getParentFile(), LOGFILE_FILTER, TrueFileFilter.INSTANCE)); } } return logFiles; } }
LogFiles { Collection<File> resolveLogFiles() throws IOException { File logDir = getLogfileDirectory(); Collection<File> logFiles = new TreeSet<>((o1, o2) -> o1.getPath().compareToIgnoreCase(o2.getPath())); if (logDir == null) { logDir = new File(this.slingHomeDirectory, "logs"); } if (logDir.exists() && logDir.isDirectory()) { logFiles.addAll(listFiles(logDir, LOGFILE_FILTER, TrueFileFilter.INSTANCE)); } for (File logFile : resolveFactoryConfiguredLogFiles()) { if (!logFile.getParentFile().getAbsolutePath().startsWith(logDir.getAbsolutePath())) { logFiles.addAll(listFiles(logFile.getParentFile(), LOGFILE_FILTER, TrueFileFilter.INSTANCE)); } } return logFiles; }  }
LogFiles { Collection<File> resolveLogFiles() throws IOException { File logDir = getLogfileDirectory(); Collection<File> logFiles = new TreeSet<>((o1, o2) -> o1.getPath().compareToIgnoreCase(o2.getPath())); if (logDir == null) { logDir = new File(this.slingHomeDirectory, "logs"); } if (logDir.exists() && logDir.isDirectory()) { logFiles.addAll(listFiles(logDir, LOGFILE_FILTER, TrueFileFilter.INSTANCE)); } for (File logFile : resolveFactoryConfiguredLogFiles()) { if (!logFile.getParentFile().getAbsolutePath().startsWith(logDir.getAbsolutePath())) { logFiles.addAll(listFiles(logFile.getParentFile(), LOGFILE_FILTER, TrueFileFilter.INSTANCE)); } } return logFiles; }   }
LogFiles { Collection<File> resolveLogFiles() throws IOException { File logDir = getLogfileDirectory(); Collection<File> logFiles = new TreeSet<>((o1, o2) -> o1.getPath().compareToIgnoreCase(o2.getPath())); if (logDir == null) { logDir = new File(this.slingHomeDirectory, "logs"); } if (logDir.exists() && logDir.isDirectory()) { logFiles.addAll(listFiles(logDir, LOGFILE_FILTER, TrueFileFilter.INSTANCE)); } for (File logFile : resolveFactoryConfiguredLogFiles()) { if (!logFile.getParentFile().getAbsolutePath().startsWith(logDir.getAbsolutePath())) { logFiles.addAll(listFiles(logFile.getParentFile(), LOGFILE_FILTER, TrueFileFilter.INSTANCE)); } } return logFiles; }    }