diff options
15 files changed, 60 insertions, 215 deletions
diff --git a/aai-core/pom.xml b/aai-core/pom.xml index 45f4fe75..8adda4b8 100644 --- a/aai-core/pom.xml +++ b/aai-core/pom.xml @@ -372,7 +372,6 @@ limitations under the License. <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> - <version>1.18.34</version> <scope>provided</scope> </dependency> </dependencies> diff --git a/aai-els-onap-logging/pom.xml b/aai-els-onap-logging/pom.xml index a8ea55ac..4447c011 100644 --- a/aai-els-onap-logging/pom.xml +++ b/aai-els-onap-logging/pom.xml @@ -70,16 +70,6 @@ <scope>provided</scope> </dependency> <dependency> - <groupId>org.onap.logging-analytics</groupId> - <artifactId>logging-slf4j</artifactId> - <exclusions> - <exclusion> - <groupId>org.powermock</groupId> - <artifactId>powermock-module-junit4</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <scope>provided</scope> diff --git a/aai-failover/pom.xml b/aai-failover/pom.xml index 67c3d399..c9be3141 100644 --- a/aai-failover/pom.xml +++ b/aai-failover/pom.xml @@ -13,11 +13,6 @@ <artifactId>aai-failover</artifactId> <dependencies> - <!-- Common logging framework --> - <dependency> - <groupId>org.onap.aai.logging-service</groupId> - <artifactId>common-logging</artifactId> - </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> @@ -26,5 +21,9 @@ <groupId>org.springframework</groupId> <artifactId>spring-aspects</artifactId> </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </dependency> </dependencies> </project> diff --git a/aai-parent/pom.xml b/aai-parent/pom.xml index 49c2a768..932907b7 100644 --- a/aai-parent/pom.xml +++ b/aai-parent/pom.xml @@ -103,6 +103,7 @@ limitations under the License. <plexus.utils.version>3.1.1</plexus.utils.version> <reflections.version>0.9.10</reflections.version> <snakeyaml.version>1.29</snakeyaml.version> + <lombok.version>1.18.34</lombok.version> <javax.servlet.version>3.1.0</javax.servlet.version> <javax.annotation.version>1.2</javax.annotation.version> @@ -449,25 +450,6 @@ limitations under the License. <version>${commons.io.version}</version> </dependency> - - <dependency> - <groupId>org.onap.aai.logging-service</groupId> - <artifactId>common-logging</artifactId> - <version>${aai.common.logging.version}</version> - </dependency> - - <dependency> - <groupId>org.onap.aai.logging-service</groupId> - <artifactId>logging-api</artifactId> - <version>${aai.common.logging.version}</version> - </dependency> - - <dependency> - <groupId>org.onap.logging-analytics</groupId> - <artifactId>logging-slf4j</artifactId> - <version>${logging.analytics.version}</version> - </dependency> - <dependency> <groupId>org.onap.aai</groupId> <artifactId>rest-client</artifactId> @@ -565,6 +547,13 @@ limitations under the License. <version>${commons.net.version}</version> </dependency> + <dependency> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + <version>${lombok.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> </dependencyManagement> diff --git a/aai-schema-abstraction/pom.xml b/aai-schema-abstraction/pom.xml index 28413c4b..512fa0d9 100644 --- a/aai-schema-abstraction/pom.xml +++ b/aai-schema-abstraction/pom.xml @@ -51,14 +51,6 @@ </exclusions> </dependency> <dependency> - <groupId>org.onap.aai.logging-service</groupId> - <artifactId>common-logging</artifactId> - </dependency> - <dependency> - <groupId>org.onap.aai.logging-service</groupId> - <artifactId>logging-api</artifactId> - </dependency> - <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> </dependency> @@ -105,6 +97,11 @@ <version>5.14.2</version> <scope>test</scope> </dependency> + <dependency> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + <scope>provided</scope> + </dependency> </dependencies> <build> <plugins> diff --git a/aai-schema-abstraction/src/main/java/org/onap/aai/schemaif/json/JsonSchemaProvider.java b/aai-schema-abstraction/src/main/java/org/onap/aai/schemaif/json/JsonSchemaProvider.java index 637bbfe4..fba6e0fd 100644 --- a/aai-schema-abstraction/src/main/java/org/onap/aai/schemaif/json/JsonSchemaProvider.java +++ b/aai-schema-abstraction/src/main/java/org/onap/aai/schemaif/json/JsonSchemaProvider.java @@ -34,8 +34,6 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; -import org.onap.aai.cl.api.Logger; -import org.onap.aai.cl.eelf.LoggerFactory; import org.onap.aai.schemaif.SchemaProvider; import org.onap.aai.schemaif.SchemaProviderException; import org.onap.aai.schemaif.SchemaProviderMsgs; @@ -51,9 +49,10 @@ import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.client.RestTemplate; +import lombok.extern.slf4j.Slf4j; + +@Slf4j public class JsonSchemaProvider implements SchemaProvider { - // Logger logger = LoggerFactory.getInstance().getLogger(JsonSchemaProvider.class.getName()); - Logger logger = LoggerFactory.getInstance().getLogger(SchemaProvider.class); private JsonSchemaProviderConfig config; private Map<String, SchemaInstance> schemaCache = new ConcurrentHashMap<>(); @@ -152,11 +151,10 @@ public class JsonSchemaProvider implements SchemaProvider { ResponseEntity<byte[]> response = restTemplate.exchange(url, HttpMethod.GET, entity, byte[].class); if (response.getStatusCodeValue() == HttpStatus.NOT_FOUND.value()) { - logger.warn(SchemaProviderMsgs.SCHEMA_LOAD_ERROR, "version " + version + " not found"); + log.warn("PVD0500E | Unable to load schema: {}", "version " + version + " not found"); throw new SchemaProviderException("Schema version " + version + " not found"); } else if (response.getStatusCodeValue() != HttpStatus.OK.value()) { - logger.error(SchemaProviderMsgs.SCHEMA_LOAD_ERROR, - "failed to load version " + version + ": " + response.getBody()); + log.error("PVD0500E | Unable to load schema: {}", "version " + version + " not found"); throw new SchemaProviderException("Error getting schema version " + version + ":" + response.getBody()); } @@ -167,13 +165,12 @@ public class JsonSchemaProvider implements SchemaProvider { StringWriter writer = new StringWriter(); PrintWriter printWriter = new PrintWriter(writer); ex.printStackTrace(printWriter); - logger.error(SchemaProviderMsgs.SCHEMA_LOAD_ERROR, - "failed to load version " + version + ": " + response.getBody() + "\n" + writer.toString()); + log.error("PVD0500E | Unable to load schema: {}", "failed to load version: " + version + ": "+ response.getBody() + "\n" + writer.toString()); throw new SchemaProviderException("Error loading schema version " + version + ":" + ex.getMessage()); } - logger.info(SchemaProviderMsgs.LOADED_SCHEMA_FILE, version); + log.info("PVD0001I|Successfully loaded schema: {}", version); } static final int BUFFER = 512; diff --git a/aai-schema-abstraction/src/main/java/org/onap/aai/schemaif/oxm/OxmEdgeRulesLoader.java b/aai-schema-abstraction/src/main/java/org/onap/aai/schemaif/oxm/OxmEdgeRulesLoader.java index b404ccfe..11150f1f 100644 --- a/aai-schema-abstraction/src/main/java/org/onap/aai/schemaif/oxm/OxmEdgeRulesLoader.java +++ b/aai-schema-abstraction/src/main/java/org/onap/aai/schemaif/oxm/OxmEdgeRulesLoader.java @@ -23,6 +23,8 @@ package org.onap.aai.schemaif.oxm; import com.google.common.collect.Multimap; +import lombok.extern.slf4j.Slf4j; + import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; @@ -36,18 +38,16 @@ import java.util.regex.Pattern; import java.util.stream.Collectors; import org.apache.commons.io.IOUtils; -import org.onap.aai.cl.api.Logger; -import org.onap.aai.cl.eelf.LoggerFactory; import org.onap.aai.edges.EdgeIngestor; import org.onap.aai.edges.EdgeRule; import org.onap.aai.edges.exceptions.EdgeRuleNotFoundException; import org.onap.aai.schemaif.SchemaProviderException; -import org.onap.aai.schemaif.SchemaProviderMsgs; import org.onap.aai.setup.SchemaVersion; import org.onap.aai.setup.Translator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +@Slf4j @Component public class OxmEdgeRulesLoader { @@ -64,8 +64,6 @@ public class OxmEdgeRulesLoader { final static Pattern propsFilePattern = Pattern.compile(propsPrefix + "(.*)" + propsSuffix); final static Pattern propsVersionPattern = Pattern.compile("(?i)v\\d*"); - private static Logger logger = LoggerFactory.getInstance().getLogger(OxmEdgeRulesLoader.class.getName()); - private OxmEdgeRulesLoader() { } @@ -94,8 +92,8 @@ public class OxmEdgeRulesLoader { public static synchronized void loadModels() throws SchemaProviderException { Map<String, File> propFiles = edgePropertyFiles(edgePropsConfiguration); - if (logger.isDebugEnabled()) { - logger.debug("Loading DB Edge Rules"); + if (log.isDebugEnabled()) { + log.debug("Loading DB Edge Rules"); } for (String version : OxmSchemaLoader.getLoadedOXMVersions()) { @@ -118,8 +116,8 @@ public class OxmEdgeRulesLoader { public static synchronized void loadModels(String v) throws SchemaProviderException { Map<String, File> propFiles = edgePropertyFiles(edgePropsConfiguration); - if (logger.isDebugEnabled()) { - logger.debug("Loading DB Edge Rules "); + if (log.isDebugEnabled()) { + log.debug("Loading DB Edge Rules "); } try { @@ -145,7 +143,7 @@ public class OxmEdgeRulesLoader { if (versionContextMap == null || versionContextMap.isEmpty()) { loadModels(); } else if (!versionContextMap.containsKey(version)) { - logger.error(SchemaProviderMsgs.SCHEMA_LOAD_ERROR, "Error loading DB Edge Rules for: " + version); + log.error("PVD0500E | Unable to load schema: {}", "Error loading DB Edge Rules for: " + version); throw new SchemaProviderException("Error loading DB Edge Rules for: " + version); } @@ -182,7 +180,7 @@ public class OxmEdgeRulesLoader { // If there are still no models available, then there's not much we can do... if (versionContextMap.isEmpty()) { - logger.error(SchemaProviderMsgs.SCHEMA_LOAD_ERROR, "No available DB Edge Rules to get latest version for."); + log.error("PVD0500E | Unable to load schema: {}", "No available DB Edge Rules to get latest version for."); throw new SchemaProviderException("No available DB Edge Rules to get latest version for."); } @@ -228,7 +226,7 @@ public class OxmEdgeRulesLoader { if (edges != null) { RelationshipSchema rs = new RelationshipSchema(edges, edgeProps); versionContextMap.put(version.toString().toLowerCase(), rs); - logger.info(SchemaProviderMsgs.LOADED_DB_RULE_FILE, version.toString()); + log.info("PVD0002I|Successfully loaded DB Edge Rule and Edge Properties for: {}", version); } } diff --git a/aai-schema-abstraction/src/main/java/org/onap/aai/schemaif/oxm/OxmSchemaLoader.java b/aai-schema-abstraction/src/main/java/org/onap/aai/schemaif/oxm/OxmSchemaLoader.java index 84bde101..71abdbc2 100644 --- a/aai-schema-abstraction/src/main/java/org/onap/aai/schemaif/oxm/OxmSchemaLoader.java +++ b/aai-schema-abstraction/src/main/java/org/onap/aai/schemaif/oxm/OxmSchemaLoader.java @@ -43,10 +43,13 @@ import org.onap.aai.setup.Translator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import lombok.extern.slf4j.Slf4j; + /** * This class contains all of the logic for importing OXM model schemas from the available OXM * schema files. */ +@Slf4j @Component public class OxmSchemaLoader { @@ -59,9 +62,6 @@ public class OxmSchemaLoader { final static Pattern versionPattern = Pattern.compile("(?i)v(\\d*)"); - private static org.onap.aai.cl.api.Logger logger = - LoggerFactory.getInstance().getLogger(OxmSchemaLoader.class.getName()); - private OxmSchemaLoader() { } @@ -86,8 +86,8 @@ public class OxmSchemaLoader { * */ public synchronized static void loadModels() throws SchemaProviderException { - if (logger.isDebugEnabled()) { - logger.debug("Loading OXM Models"); + if (log.isDebugEnabled()) { + log.debug("Loading OXM Models"); } for (SchemaVersion oxmVersion : translator.getSchemaVersions().getVersions()) { @@ -102,7 +102,7 @@ public class OxmSchemaLoader { versionContextMap.put(oxmVersion, jaxbContext); loadXmlLookupMap(oxmVersion, jaxbContext); loadVertexLookupMap(oxmVersion, jaxbContext); - logger.info(SchemaProviderMsgs.LOADED_SCHEMA_FILE, oxmVersion); + log.info("PVD0001I|Successfully loaded schema: {}", oxmVersion); } /** @@ -208,7 +208,7 @@ public class OxmSchemaLoader { } // If there are still no models available, then there's not much we can do... if (versionContextMap.isEmpty()) { - logger.error(SchemaProviderMsgs.SCHEMA_LOAD_ERROR, "No available OXM schemas to get versions for."); + log.error("PVD0500E|Unable to load schema: No available OXM schemas to get versions for."); throw new SchemaProviderException("No available OXM schemas to get latest version for."); } List<String> versions = new ArrayList<String>(); diff --git a/aai-schema-abstraction/src/main/java/org/onap/aai/schemaif/oxm/RelationshipSchema.java b/aai-schema-abstraction/src/main/java/org/onap/aai/schemaif/oxm/RelationshipSchema.java index 32350779..63cec9da 100644 --- a/aai-schema-abstraction/src/main/java/org/onap/aai/schemaif/oxm/RelationshipSchema.java +++ b/aai-schema-abstraction/src/main/java/org/onap/aai/schemaif/oxm/RelationshipSchema.java @@ -26,6 +26,8 @@ package org.onap.aai.schemaif.oxm; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.Multimap; +import lombok.extern.slf4j.Slf4j; + import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; @@ -36,11 +38,10 @@ import java.util.Map; import java.util.Set; import java.util.stream.Collectors; -import org.onap.aai.cl.eelf.LoggerFactory; import org.onap.aai.edges.EdgeRule; import org.onap.aai.schemaif.SchemaProviderException; -import org.onap.aai.schemaif.SchemaProviderMsgs; +@Slf4j public class RelationshipSchema { public static final String SCHEMA_SOURCE_NODE_TYPE = "from"; @@ -48,9 +49,6 @@ public class RelationshipSchema { public static final String SCHEMA_RELATIONSHIP_TYPE = "label"; public static final String SCHEMA_RULES_ARRAY = "rules"; - private static org.onap.aai.cl.api.Logger logger = - LoggerFactory.getInstance().getLogger(RelationshipSchema.class.getName()); - private Map<String, Map<String, Class<?>>> relations = new HashMap<>(); /** * Hashmap of valid relationship types along with properties. @@ -85,7 +83,7 @@ public class RelationshipSchema { try { return resolveClass(p.getValue()); } catch (SchemaProviderException | ClassNotFoundException e) { - logger.error(SchemaProviderMsgs.SCHEMA_LOAD_ERROR, "Error in RelationshipSchema: " + e); + log.error("PVD0500E|Unable to load schema: {}", "Error in RelationshipSchema: " + e); } return null; })); @@ -124,7 +122,7 @@ public class RelationshipSchema { try { return resolveClass(p.getValue()); } catch (SchemaProviderException | ClassNotFoundException e) { - logger.error(SchemaProviderMsgs.SCHEMA_LOAD_ERROR, "Error in RelationshipSchema: " + e); + log.error("PVD0500E|Unable to load schema: {}", "Error in RelationshipSchema: " + e); } return null; })); diff --git a/aai-schema-abstraction/src/main/resources/logging/SchemaProviderMsgs.properties b/aai-schema-abstraction/src/main/resources/logging/SchemaProviderMsgs.properties deleted file mode 100644 index 0feb2acd..00000000 --- a/aai-schema-abstraction/src/main/resources/logging/SchemaProviderMsgs.properties +++ /dev/null @@ -1,16 +0,0 @@ - -## Error Logs -SCHEMA_LOAD_ERROR=\ - PVD0500E|\ - Unable to load schema: {0} - -## Info Logs -LOADED_SCHEMA_FILE=\ - PVD0001I|\ - Successfully loaded schema: {0} - -LOADED_DB_RULE_FILE=\ - PVD0002I|\ - Successfully loaded DB Edge Rule and Edge Properties for: {0} - - diff --git a/aai-utils/pom.xml b/aai-utils/pom.xml index 3d7b9818..a38890d4 100644 --- a/aai-utils/pom.xml +++ b/aai-utils/pom.xml @@ -50,11 +50,6 @@ <groupId>jakarta.xml.bind</groupId> <artifactId>jakarta.xml.bind-api</artifactId> </dependency> - <!-- Common logging framework --> - <dependency> - <groupId>org.onap.aai.logging-service</groupId> - <artifactId>common-logging</artifactId> - </dependency> <!-- https://mvnrepository.com/artifact/org.springframework/spring-core --> <dependency> <groupId>org.springframework</groupId> @@ -73,6 +68,11 @@ <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> </dependency> + <dependency> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + <scope>provided</scope> + </dependency> <dependency> <groupId>org.hamcrest</groupId> <artifactId>hamcrest-junit</artifactId> diff --git a/aai-utils/src/main/java/org/onap/aaiutils/oxm/OxmModelLoader.java b/aai-utils/src/main/java/org/onap/aaiutils/oxm/OxmModelLoader.java index e9236476..f10a4fde 100644 --- a/aai-utils/src/main/java/org/onap/aaiutils/oxm/OxmModelLoader.java +++ b/aai-utils/src/main/java/org/onap/aaiutils/oxm/OxmModelLoader.java @@ -39,17 +39,17 @@ import javax.xml.bind.JAXBException; import org.eclipse.persistence.jaxb.JAXBContextProperties; import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext; import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContextFactory; -import org.onap.aai.cl.api.Logger; -import org.onap.aai.cl.eelf.LoggerFactory; import org.springframework.core.io.Resource; import org.springframework.core.io.support.PathMatchingResourcePatternResolver; import org.springframework.core.io.support.ResourcePatternResolver; +import lombok.extern.slf4j.Slf4j; + +@Slf4j public class OxmModelLoader { private static final Pattern AAI_OXM_FILE_PATTERN = Pattern.compile("aai_oxm_(.*).xml"); private static Map<String, DynamicJAXBContext> versionContextMap = new ConcurrentHashMap<>(); - private static final Logger LOGGER = LoggerFactory.getInstance().getLogger(OxmModelLoader.class.getName()); public synchronized static void loadModels() throws Exception { OxmModelLoader.loadModels("classpath*:/oxm/aai_oxm*.xml", AAI_OXM_FILE_PATTERN); @@ -65,8 +65,7 @@ public class OxmModelLoader { try { OxmModelLoader.loadModel(matcher.group(1), resource); } catch (Exception e) { - LOGGER.error(OxmModelLoaderMsgs.OXM_LOAD_ERROR, - "Failed to load " + resource.getFilename() + ": " + e.getMessage()); + log.error("CRD0503E|Unable to load OXM schema: {}", "Failed to load " + resource.getFilename() + ": " + e.getMessage()); throw new Exception("Failed to load schema"); } } @@ -79,7 +78,7 @@ public class OxmModelLoader { Resource[] resources = resolver.getResources(oxmResourcesPattern); if (resources.length == 0) { - LOGGER.error(OxmModelLoaderMsgs.OXM_LOAD_ERROR, "No OXM schema files found on classpath"); + log.error("CRD0503E|Unable to load OXM schema: {}", "No OXM schema files found on classpath"); throw new Exception("Failed to load schema"); } return resources; @@ -129,8 +128,7 @@ public class OxmModelLoader { .createContextFromOXM(Thread.currentThread().getContextClassLoader(), properties); versionContextMap.put(version, jaxbContext); - - LOGGER.info(OxmModelLoaderMsgs.LOADED_OXM_FILE, resourceName); + log.info("CRD0007I|Successfully loaded schema: {}", resourceName); } } diff --git a/aai-utils/src/main/java/org/onap/aaiutils/oxm/OxmModelLoaderMsgs.java b/aai-utils/src/main/java/org/onap/aaiutils/oxm/OxmModelLoaderMsgs.java deleted file mode 100644 index c2794e24..00000000 --- a/aai-utils/src/main/java/org/onap/aaiutils/oxm/OxmModelLoaderMsgs.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * ============LICENSE_START======================================================= - * org.onap.aai - * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. - * Copyright © 2017-2018 Amdocs - * All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.aaiutils.oxm; - -import com.att.eelf.i18n.EELFResourceManager; - -import org.onap.aai.cl.eelf.LogMessageEnum; - -public enum OxmModelLoaderMsgs implements LogMessageEnum { - - /** - * Invalid Model File - * Arguments: - * {0} = File/Dir - * {1} = error - */ - - INVALID_OXM_FILE, INVALID_OXM_DIR, - - /** - * Unable to load OXM schema: {0} - * - * <p> - * Arguments: - * {0} = error - */ - OXM_LOAD_ERROR, - - /** - * Successfully loaded schema: {0} - * - * <p> - * Arguments: - * {0} = oxm filename - */ - LOADED_OXM_FILE; - - /** - * Static initializer to ensure the resource bundles for this class are loaded... - */ - static { - EELFResourceManager.loadMessageBundle("oxm/OxmModelLoaderMsgs"); - } -} diff --git a/aai-utils/src/main/resources/oxm/OxmModelLoaderMsgs.properties b/aai-utils/src/main/resources/oxm/OxmModelLoaderMsgs.properties deleted file mode 100644 index d4a5559f..00000000 --- a/aai-utils/src/main/resources/oxm/OxmModelLoaderMsgs.properties +++ /dev/null @@ -1,40 +0,0 @@ -#Resource key=Error Code|Message text|Resolution text |Description text -####### -#Newlines can be utilized to add some clarity ensuring continuing line -#has atleast one leading space -#ResourceKey=\ -# CA0000E\ -# Sample error msg txt\ -# Sample resolution msg\ -# Sample description txt -# -###### -#Error code classification category -#000 Info/Debug -#100 Permission errors -#200 Availability errors/Timeouts -#300 Data errors -#400 Schema Interface type/validation errors -#500 Business process errors -#900 Unknown errors -# -######################################################################## - -INVALID_OXM_FILE=\ - CRD0002I|\ - Unable to parse schema file: {0} due to error : {1}\ - -OXM_FILE_CHANGED=\ - CRD0003I|\ - OXM file change detected: {0}\ - -INVALID_OXM_DIR=\ - CRD0005I|\ - Invalid OXM dir: {0}\ - -LOADED_OXM_FILE=\ - CRD0007I|\ - Successfully loaded schema: {0} -OXM_LOAD_ERROR=\ - CRD0503E|\ - Unable to load OXM schema: {0} diff --git a/aai-utils/src/test/java/org/onap/aaiutils/oxm/OxmModelLoaderTest.java b/aai-utils/src/test/java/org/onap/aaiutils/oxm/OxmModelLoaderTest.java index bcfdbebc..356f8708 100644 --- a/aai-utils/src/test/java/org/onap/aaiutils/oxm/OxmModelLoaderTest.java +++ b/aai-utils/src/test/java/org/onap/aaiutils/oxm/OxmModelLoaderTest.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -44,7 +44,7 @@ public class OxmModelLoaderTest { public void shouldReportAnErrorWhenOxmModelsAreNotAvailable() { Throwable exception = assertThrows(Exception.class, () -> - OxmModelLoader.loadModels("classpath*:non_existing_aai_oxm*.xml", + OxmModelLoader.loadModels("classpath*:non_existing_aai_oxm*.xml", Pattern.compile("non_existing_aai_oxm_(.*).xml"))); assertTrue(exception.getMessage().contains("Failed to load schema")); } |