[ONOS-4149],[ONOS-3909] YANG list translator impl and bug fixes.
Change-Id: Ia1a94142a3a114815766f661ed850bf9cacde66f
diff --git a/src/main/java/org/onosproject/yangutils/utils/io/impl/YangFileScanner.java b/src/main/java/org/onosproject/yangutils/utils/io/impl/YangFileScanner.java
index 54adce9..9de5358 100644
--- a/src/main/java/org/onosproject/yangutils/utils/io/impl/YangFileScanner.java
+++ b/src/main/java/org/onosproject/yangutils/utils/io/impl/YangFileScanner.java
@@ -23,10 +23,13 @@
import java.util.Stack;
/**
- * Provides the IO services for Yangutils-maven-Plugin.
+ * Provides utility for searching the files in a directory.
*/
public final class YangFileScanner {
+ private static final String JAVA_FILE_EXTENTION = ".java";
+ private static final String YANG_FILE_EXTENTION = ".yang";
+
/**
* Default constructor.
*/
@@ -44,7 +47,7 @@
*/
public static List<String> getJavaFiles(String root) throws NullPointerException, IOException {
- return getFiles(root, ".java");
+ return getFiles(root, JAVA_FILE_EXTENTION);
}
/**
@@ -58,7 +61,7 @@
*/
public static List<String> getYangFiles(String root) throws NullPointerException, IOException {
- return getFiles(root, ".yang");
+ return getFiles(root, YANG_FILE_EXTENTION);
}
/**
@@ -68,8 +71,7 @@
* @param extension file extension
* @return list of required files
* @throws NullPointerException when no file is there
- * @throws IOException when files get deleted while performing the
- * operations
+ * @throws IOException when files get deleted while performing the operations
*/
public static List<String> getFiles(String root, String extension) throws NullPointerException, IOException {