From 7a09c652717e7253417bcba2bccb72f0c0da5cb9 Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Tue, 11 Dec 2018 17:10:13 +0530 Subject: fixed sonar issues in ConfigModelService.java fixed sonar issues Issue-ID: CCSDK-552 Change-Id: Iab02d1cee2b0cb9e182f9d4af839000307ec99bf Signed-off-by: Sandeep J --- .../apps/controllerblueprints/service/ConfigModelService.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ms/controllerblueprints/modules') diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ConfigModelService.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ConfigModelService.java index a2f653c6..b2fff26e 100644 --- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ConfigModelService.java +++ b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ConfigModelService.java @@ -55,6 +55,7 @@ public class ConfigModelService { private ConfigModelRepository configModelRepository; private ConfigModelContentRepository configModelContentRepository; private ConfigModelCreateService configModelCreateService; + private static final String CONFIG_MODEL_ID_FAILURE_MSG= "failed to get config model id(%d) from repo"; /** * This is a ConfigModelService constructor. @@ -174,7 +175,7 @@ public class ConfigModelService { if (dbConfigModel.isPresent()) { configModel = dbConfigModel.get(); } else { - throw new BluePrintException(String.format("failed to get config model id(%d) from repo", id)); + throw new BluePrintException(String.format(CONFIG_MODEL_ID_FAILURE_MSG, id)); } return configModel; @@ -232,7 +233,7 @@ public class ConfigModelService { } } } else { - throw new BluePrintException(String.format("failed to get config model id(%d) from repo", id)); + throw new BluePrintException(String.format(CONFIG_MODEL_ID_FAILURE_MSG, id)); } return cloneConfigModel; @@ -252,7 +253,7 @@ public class ConfigModelService { configModelContentRepository.deleteByConfigModel(dbConfigModel.get()); configModelRepository.delete(dbConfigModel.get()); } else { - throw new BluePrintException(String.format("failed to get config model id(%d) from repo", id)); + throw new BluePrintException(String.format(CONFIG_MODEL_ID_FAILURE_MSG, id)); } } -- cgit 1.2.3-korg on/rules-test/pom.xml?h=v1.1.0&id=f7666e8e19d8467d457668dfc1d1cb19d1d47627'>treecommitdiffstats
blob: 8da8173038be8d85c76a2e0cce979c39c937a608 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!--
  ============LICENSE_START=======================================================
  ONAP
  ================================================================================
  Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
  Modifications Copyright (C) 2023 Nordix Foundation.
  ================================================================================
  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=========================================================
  -->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.onap.policy.drools-applications.controlloop.common</groupId>
        <artifactId>drools-applications-common</artifactId>
        <version>2.1.2-SNAPSHOT</version>
    </parent>

    <artifactId>rules-test</artifactId>
    <description>Common Utilities to facilitate testing via JUnit</description>
    <packaging>jar</packaging>

    <dependencies>
        <dependency>
            <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
            <artifactId>events</artifactId>
            <version>${policy.models.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
            <artifactId>appc</artifactId>
            <version>${policy.models.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
            <artifactId>appclcm</artifactId>
            <version>${policy.models.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </dependency>
        <dependency>
            <groupId>org.onap.policy.common</groupId>
            <artifactId>utils</artifactId>
            <version>${version.policy.common}</version>
        </dependency>
        <dependency>
            <groupId>org.onap.policy.common</groupId>
            <artifactId>policy-endpoints</artifactId>
            <version>${version.policy.common}</version>
        </dependency>
        <dependency>
            <groupId>org.onap.policy.models.policy-models-interactions</groupId>
            <artifactId>simulators</artifactId>
            <version>${policy.models.version}</version>
        </dependency>
        <dependency>
            <groupId>org.onap.policy.drools-applications.controlloop.common</groupId>
            <artifactId>eventmanager</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.onap.policy.drools-pdp</groupId>
            <artifactId>policy-management</artifactId>
            <version>${version.policy.drools-pdp}</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.onap.policy.common</groupId>
            <artifactId>utils-test</artifactId>
            <version>${version.policy.common}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>