summaryrefslogtreecommitdiffstats
path: root/aai-schema-ingest
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-12-11 09:21:34 +0100
committerFiete Ostkamp <fiete.ostkamp@telekom.de>2024-12-11 08:27:21 +0000
commit5c2e24008d5b093f86aa5dce8db1336d9211d1d2 (patch)
tree9e60f3f5ec3b76a442206b9b9752e6ec5a616a3e /aai-schema-ingest
parent498b357833a128211aac0bf6c4325f0b100b72b6 (diff)
Reduce org.json usage in aai-common
- org.json [is slow](https://github.com/fabienrenaud/java-json-benchmark?tab=readme-ov-file#users-model) - Jackson should be consistently used everywhere - only XmlFormatTransformer is left, but that warrants a dedicated change with (likely) further tests since it appears to be quite a critical execution path - remove unused imports - update org.json to a non-vulnerable version Issue-ID: AAI-4085 Change-Id: I84610523447d70a1729348392ffd302d17e9379d Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'aai-schema-ingest')
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/config/RestConfiguration.java5
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/config/TranslatorConfiguration.java2
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/setup/Translator.java3
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorWiringTest.java3
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeRuleQueryTest.java2
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeRuleTest.java2
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/edges/JsonIngestorTest.java2
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/edges/TypeAlphabetizerTest.java2
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorWiringTest.java2
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/validation/CheckEverythingStrategyTest.java3
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/validation/FailFastStrategyTest.java3
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorRainyDayTest.java3
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorSunnyDayTest.java2
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/CousinDefaultingValidationModuleTest.java2
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/DefaultEdgeFieldsValidationModuleTest.java2
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/EdgeRuleValidatorSunnyDayTest.java3
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/NodeTypesValidationModuleTest.java2
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/SingleContainmentValidationModuleTest.java2
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/UniqueLabelValidationModuleTest.java2
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorSunnyDayTest.java3
20 files changed, 30 insertions, 20 deletions
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/config/RestConfiguration.java b/aai-schema-ingest/src/main/java/org/onap/aai/config/RestConfiguration.java
index c46ab78d..01e265fa 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/config/RestConfiguration.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/config/RestConfiguration.java
@@ -22,7 +22,10 @@
package org.onap.aai.config;
-import org.onap.aai.restclient.*;
+import org.onap.aai.restclient.RestClient;
+import org.onap.aai.restclient.SchemaServiceNoAuthClient;
+import org.onap.aai.restclient.SchemaServiceOneWayClient;
+import org.onap.aai.restclient.SchemaServiceRestClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/config/TranslatorConfiguration.java b/aai-schema-ingest/src/main/java/org/onap/aai/config/TranslatorConfiguration.java
index d49e6ec7..8498d908 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/config/TranslatorConfiguration.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/config/TranslatorConfiguration.java
@@ -22,7 +22,7 @@
package org.onap.aai.config;
-import org.onap.aai.setup.*;
+import org.onap.aai.setup.ConfigTranslator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/setup/Translator.java b/aai-schema-ingest/src/main/java/org/onap/aai/setup/Translator.java
index 45ca0cd6..a9144a6c 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/setup/Translator.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/setup/Translator.java
@@ -20,7 +20,8 @@
package org.onap.aai.setup;
-import java.io.*;
+import java.io.IOException;
+import java.io.InputStream;
import java.util.List;
/**
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorWiringTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorWiringTest.java
index fa7f04cd..e780b2e5 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorWiringTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorWiringTest.java
@@ -20,7 +20,8 @@
package org.onap.aai.edges;
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import com.google.common.collect.Multimap;
import org.junit.jupiter.api.Test;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeRuleQueryTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeRuleQueryTest.java
index 3396b93c..ecca4c8d 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeRuleQueryTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeRuleQueryTest.java
@@ -20,7 +20,7 @@
package org.onap.aai.edges;
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import com.jayway.jsonpath.DocumentContext;
import com.jayway.jsonpath.JsonPath;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeRuleTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeRuleTest.java
index 798a32f6..59561f60 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeRuleTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeRuleTest.java
@@ -20,7 +20,7 @@
package org.onap.aai.edges;
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.HashMap;
import java.util.Map;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/edges/JsonIngestorTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/edges/JsonIngestorTest.java
index 66fbcceb..106ac15c 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/edges/JsonIngestorTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/edges/JsonIngestorTest.java
@@ -22,7 +22,7 @@ package org.onap.aai.edges;
import static com.jayway.jsonpath.Criteria.where;
import static com.jayway.jsonpath.Filter.filter;
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import com.jayway.jsonpath.DocumentContext;
import com.jayway.jsonpath.Filter;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/edges/TypeAlphabetizerTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/edges/TypeAlphabetizerTest.java
index b1063107..d6de1c4e 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/edges/TypeAlphabetizerTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/edges/TypeAlphabetizerTest.java
@@ -20,7 +20,7 @@
package org.onap.aai.edges;
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorWiringTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorWiringTest.java
index 07631ce2..fa7d001a 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorWiringTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorWiringTest.java
@@ -20,7 +20,7 @@
package org.onap.aai.nodes;
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import org.eclipse.persistence.dynamic.DynamicEntity;
import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/CheckEverythingStrategyTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/CheckEverythingStrategyTest.java
index 0022e151..d78976d7 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/CheckEverythingStrategyTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/CheckEverythingStrategyTest.java
@@ -20,7 +20,8 @@
package org.onap.aai.validation;
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/FailFastStrategyTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/FailFastStrategyTest.java
index 043e9c71..9aef2c45 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/FailFastStrategyTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/FailFastStrategyTest.java
@@ -20,7 +20,8 @@
package org.onap.aai.validation;
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorRainyDayTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorRainyDayTest.java
index bcf79d2d..49dcbe5d 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorRainyDayTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorRainyDayTest.java
@@ -20,7 +20,8 @@
package org.onap.aai.validation;
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test;
import org.onap.aai.config.NodesConfiguration;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorSunnyDayTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorSunnyDayTest.java
index f2bb85a3..d3012c8f 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorSunnyDayTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorSunnyDayTest.java
@@ -20,7 +20,7 @@
package org.onap.aai.validation;
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test;
import org.onap.aai.config.NodesConfiguration;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/CousinDefaultingValidationModuleTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/CousinDefaultingValidationModuleTest.java
index 466e4b90..6a5b162c 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/CousinDefaultingValidationModuleTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/CousinDefaultingValidationModuleTest.java
@@ -20,7 +20,7 @@
package org.onap.aai.validation.edges;
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import com.jayway.jsonpath.DocumentContext;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/DefaultEdgeFieldsValidationModuleTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/DefaultEdgeFieldsValidationModuleTest.java
index 08298f2f..1f25b810 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/DefaultEdgeFieldsValidationModuleTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/DefaultEdgeFieldsValidationModuleTest.java
@@ -20,7 +20,7 @@
package org.onap.aai.validation.edges;
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.HashMap;
import java.util.Map;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/EdgeRuleValidatorSunnyDayTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/EdgeRuleValidatorSunnyDayTest.java
index 53cad53c..42dd8595 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/EdgeRuleValidatorSunnyDayTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/EdgeRuleValidatorSunnyDayTest.java
@@ -20,7 +20,8 @@
package org.onap.aai.validation.edges;
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test;
import org.onap.aai.config.NodesConfiguration;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/NodeTypesValidationModuleTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/NodeTypesValidationModuleTest.java
index 191a10d0..78e8e258 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/NodeTypesValidationModuleTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/NodeTypesValidationModuleTest.java
@@ -20,7 +20,7 @@
package org.onap.aai.validation.edges;
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.ArrayList;
import java.util.List;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/SingleContainmentValidationModuleTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/SingleContainmentValidationModuleTest.java
index d34772e3..619831d8 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/SingleContainmentValidationModuleTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/SingleContainmentValidationModuleTest.java
@@ -20,7 +20,7 @@
package org.onap.aai.validation.edges;
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import com.jayway.jsonpath.DocumentContext;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/UniqueLabelValidationModuleTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/UniqueLabelValidationModuleTest.java
index 22553b9e..04b5802e 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/UniqueLabelValidationModuleTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/UniqueLabelValidationModuleTest.java
@@ -20,7 +20,7 @@
package org.onap.aai.validation.edges;
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import com.jayway.jsonpath.DocumentContext;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorSunnyDayTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorSunnyDayTest.java
index d8a69333..e478da1b 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorSunnyDayTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorSunnyDayTest.java
@@ -20,7 +20,8 @@
package org.onap.aai.validation.nodes;
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test;
import org.onap.aai.config.NodesConfiguration;