diff options
Diffstat (limited to 'cps-service/src/main/java')
-rw-r--r-- | cps-service/src/main/java/org/onap/cps/spi/exceptions/ConcurrencyException.java | 27 | ||||
-rw-r--r-- | cps-service/src/main/java/org/onap/cps/utils/YangUtils.java | 3 |
2 files changed, 29 insertions, 1 deletions
diff --git a/cps-service/src/main/java/org/onap/cps/spi/exceptions/ConcurrencyException.java b/cps-service/src/main/java/org/onap/cps/spi/exceptions/ConcurrencyException.java new file mode 100644 index 0000000000..3a8a94b979 --- /dev/null +++ b/cps-service/src/main/java/org/onap/cps/spi/exceptions/ConcurrencyException.java @@ -0,0 +1,27 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (c) 2021 Bell Canada. + * ================================================================================ + * 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.cps.spi.exceptions; + +public class ConcurrencyException extends CpsException { + + public ConcurrencyException(final String message, final String details, final Throwable cause) { + super(message, details, cause); + } + +} diff --git a/cps-service/src/main/java/org/onap/cps/utils/YangUtils.java b/cps-service/src/main/java/org/onap/cps/utils/YangUtils.java index e6c49ac8b2..8c32010d7b 100644 --- a/cps-service/src/main/java/org/onap/cps/utils/YangUtils.java +++ b/cps-service/src/main/java/org/onap/cps/utils/YangUtils.java @@ -44,6 +44,7 @@ import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNormalizedNodeS import org.opendaylight.yangtools.yang.data.impl.schema.NormalizedNodeResult; import org.opendaylight.yangtools.yang.model.api.DataNodeContainer; import org.opendaylight.yangtools.yang.model.api.DataSchemaNode; +import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext; import org.opendaylight.yangtools.yang.model.api.SchemaContext; @Slf4j @@ -83,7 +84,7 @@ public class YangUtils { private static NormalizedNode<?, ?> parseJsonData(final String jsonData, final SchemaContext schemaContext, final Optional<DataSchemaNode> optionalParentSchemaNode) { final var jsonCodecFactory = JSONCodecFactorySupplier.DRAFT_LHOTKA_NETMOD_YANG_JSON_02 - .getShared(schemaContext); + .getShared((EffectiveModelContext) schemaContext); final var normalizedNodeResult = new NormalizedNodeResult(); final var normalizedNodeStreamWriter = ImmutableNormalizedNodeStreamWriter .from(normalizedNodeResult); |