void (Collection<String> paths) { if (paths.isEmpty()) return; final String[] buffer = new String[paths.size()]; int i = 0; for (final String o : paths) { buffer[i++] = o; } Arrays.sort(buffer); logLine("Cleaning output files:"); for (final String o : buffer) { logLine(o); } logLine("End of files"); }