- File sourcesDir = new File("src/test/resources/yang");
- File[] sourceFiles = sourcesDir.listFiles();
- String[] sourcesDirPaths = new String[sourceFiles.length];
- for (int i = 0; i < sourceFiles.length; i++) {
- sourcesDirPaths[i] = sourceFiles[i].getAbsolutePath();
+ final String resPath = getClass().getResource("/yang").getPath();
+ final File sourcesDir = new File(resPath);
+ final List<File> sourceFiles = new ArrayList<File>();
+ final File[] fileArray = sourcesDir.listFiles();
+
+ for (int i = 0; i < fileArray.length; ++i) {
+ sourceFiles.add(fileArray[i]);