diff options
author | vempo <vitaliy.emporopulo@amdocs.com> | 2018-01-15 18:56:23 +0200 |
---|---|---|
committer | Vitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com> | 2018-01-16 11:56:32 +0000 |
commit | c3f68a3a585985d394116e8c8f141b77619793e1 (patch) | |
tree | e73bf909b2c260bfba84f452f074225b85910f91 /openecomp-be/api | |
parent | 5226d07347890d68463dfce0288ccfc5e3acaba6 (diff) |
Removed MDC from four modules
Change-Id: I4cba1701cb52121709bbd98dbee4a0cb42f1e5f0
Issue-ID: SDC-772
Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
Diffstat (limited to 'openecomp-be/api')
2 files changed, 6 insertions, 24 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/pom.xml index 5d9b49892f..da8147f287 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/pom.xml +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/pom.xml @@ -16,8 +16,8 @@ <groupId>org.openecomp.sdc</groupId> <artifactId>openecomp-sdc-logging-core</artifactId> <version>${project.version}</version> + <scope>runtime</scope> </dependency> - <dependency> <groupId>org.openecomp.sdc.core</groupId> <artifactId>openecomp-utilities-lib</artifactId> diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/mapping/MappingBase.java b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/mapping/MappingBase.java index 8ae3d30846..8b6fca5ae1 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/mapping/MappingBase.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/mapping/MappingBase.java @@ -17,12 +17,7 @@ package org.openecomp.sdcrests.mapping; import org.openecomp.sdc.common.errors.CoreException; -import org.openecomp.sdc.common.errors.ErrorCategory; import org.openecomp.sdc.common.errors.ErrorCode; -import org.openecomp.sdc.datatypes.error.ErrorLevel; -import org.openecomp.sdc.logging.context.impl.MdcDataErrorMessage; -import org.openecomp.sdc.logging.types.LoggerConstants; -import org.openecomp.sdc.logging.types.LoggerServiceName; /** * Base class for all mapping classes. Mapping classes will perform data mapping from source object @@ -62,8 +57,8 @@ public abstract class MappingBase<S, T> { /** * This method is called before the <code>doMapping</code> method. */ - public void preMapping(final S source, T target) { + // extension point } /** @@ -80,8 +75,8 @@ public abstract class MappingBase<S, T> { /** * This method is called after the <code>doMapping</code> method. */ - public void postMapping(final S source, T target) { + // extension point } /** @@ -91,26 +86,13 @@ public abstract class MappingBase<S, T> { */ private Object instantiateTarget(final Class<?> clazz) { - Object object = null; - try { - object = clazz.newInstance(); + try { + return clazz.newInstance(); } catch (InstantiationException | IllegalAccessException exception ) { - MdcDataErrorMessage.createErrorMessageAndUpdateMdc( - LoggerConstants.TARGET_ENTITY, - LoggerServiceName.Create_LIMIT.toString(), ErrorLevel.ERROR.name(), - exception.getMessage(), exception.getMessage()); - throw new CoreException((new ErrorCode.ErrorCodeBuilder()) - .withMessage(exception.getMessage()) - .withId(exception.getMessage()) - .withCategory(ErrorCategory.APPLICATION).build()); - - + .withMessage(exception.getMessage()).build(), exception); } - return object; - } - } |