import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
static Collection<File> listFiles(File root, File[] excludedFiles, Log log) throws FileNotFoundException {
if (!root.exists()) {
- throw new FileNotFoundException(root.toString());
+ if (log != null) {
+ log.warn(Util.message("YANG source directory %s not found. No code will be generated.", YangToSourcesProcessor.LOG_PREFIX, root.toString()));
+ }
+ return Collections.emptyList();
}
Collection<File> result = new ArrayList<>();
Collection<File> yangFiles = FileUtils.listFiles(root, new String[] { YANG_SUFFIX }, true);