summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--aai-parent/pom.xml2
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/setup/AAIConfigTranslator.java14
2 files changed, 10 insertions, 6 deletions
diff --git a/aai-parent/pom.xml b/aai-parent/pom.xml
index 52bedfda..b4cf13e6 100644
--- a/aai-parent/pom.xml
+++ b/aai-parent/pom.xml
@@ -57,7 +57,7 @@ limitations under the License.
<commons.text.version>1.10.0</commons.text.version>
<docker.fabric.version>0.40.2</docker.fabric.version>
<easy.mock.version>5.0.0</easy.mock.version>
- <eclipse.persistence.version>2.7.11</eclipse.persistence.version>
+ <eclipse.persistence.version>2.7.15</eclipse.persistence.version>
<eelf.core.version>2.0.0-oss</eelf.core.version>
<freemarker.version>2.3.31</freemarker.version>
<google.guava.version>31.1-jre</google.guava.version>
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/setup/AAIConfigTranslator.java b/aai-schema-ingest/src/main/java/org/onap/aai/setup/AAIConfigTranslator.java
index 66ffcf88..ca5eed39 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/setup/AAIConfigTranslator.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/setup/AAIConfigTranslator.java
@@ -48,7 +48,7 @@ public class AAIConfigTranslator extends ConfigTranslator {
/*
* (non-Javadoc)
- *
+ *
* @see org.onap.aai.setup.ConfigTranslator#getNodeFiles()
*/
@Override
@@ -70,7 +70,7 @@ public class AAIConfigTranslator extends ConfigTranslator {
/*
* (non-Javadoc)
- *
+ *
* @see org.onap.aai.setup.ConfigTranslator#getEdgeFiles()
*/
@Override
@@ -94,9 +94,13 @@ public class AAIConfigTranslator extends ConfigTranslator {
private List<String> getVersionFiles(String startDirectory, SchemaVersion schemaVersion,
Supplier<Stream<String>> inclusionPattern, Supplier<Stream<String>> exclusionPattern) {
- final File versionDirectory = new File(startDirectory + "/" + schemaVersion.toString());
- final List<String> container = Arrays.stream(versionDirectory.listFiles())
- .filter(Objects::nonNull)
+ final File versionDirectory = new File(startDirectory + "/" + schemaVersion.toString());
+ File[] versionFiles = versionDirectory.listFiles();
+ if(versionFiles == null) {
+ throw new RuntimeException("No files found in directory: " + versionDirectory.getAbsolutePath());
+ }
+ final List<String> container = Arrays.stream(versionFiles)
+ .filter(Objects::nonNull)
.map(File::getName)
.filter(versionFileName -> inclusionPattern
.get()