summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRishi Chail <rishi.chail@est.tech>2020-09-28 12:30:58 +0100
committerRishi Chail <rishi.chail@est.tech>2020-09-28 12:30:58 +0100
commitf925587e61afd94d8510420e2c4df886e12cfad5 (patch)
tree1f94123227b4007070907968b7713455d8807d2e
parent6820538d8f5f999f1fa7bc64ad40e2a2cee7c85b (diff)
IS: Add CheckStyle goal to Maven
Issue-ID: CCSDK-2746 https: //jira.onap.org/browse/CCSDK-2746 Change-Id: I0442b62cbecb16c979a43d3d5d68fdb1c62a2276
-rw-r--r--cps/cps-rest/src/main/java/org/onap/cps/rest/controller/RestController.java4
-rw-r--r--cps/cps-service/src/main/java/org/onap/cps/api/CpService.java (renamed from cps/cps-service/src/main/java/org/onap/cps/api/CPService.java)2
-rw-r--r--cps/cps-service/src/main/java/org/onap/cps/api/impl/CpServiceImpl.java (renamed from cps/cps-service/src/main/java/org/onap/cps/api/impl/CPServiceImpl.java)8
-rw-r--r--cps/cps-service/src/main/java/org/onap/cps/spi/ModelPersistencyService.java7
-rw-r--r--cps/pom.xml6
5 files changed, 14 insertions, 13 deletions
diff --git a/cps/cps-rest/src/main/java/org/onap/cps/rest/controller/RestController.java b/cps/cps-rest/src/main/java/org/onap/cps/rest/controller/RestController.java
index d2f1a3e037..dc6411009b 100644
--- a/cps/cps-rest/src/main/java/org/onap/cps/rest/controller/RestController.java
+++ b/cps/cps-rest/src/main/java/org/onap/cps/rest/controller/RestController.java
@@ -29,7 +29,7 @@ import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import org.glassfish.jersey.media.multipart.FormDataParam;
-import org.onap.cps.api.CPService;
+import org.onap.cps.api.CpService;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.opendaylight.yangtools.yang.model.parser.api.YangParserException;
import org.springframework.beans.factory.annotation.Autowired;
@@ -39,7 +39,7 @@ import org.springframework.beans.factory.annotation.Autowired;
public class RestController {
@Autowired
- private CPService cpService;
+ private CpService cpService;
@POST
@Path("uploadYangFile")
diff --git a/cps/cps-service/src/main/java/org/onap/cps/api/CPService.java b/cps/cps-service/src/main/java/org/onap/cps/api/CpService.java
index 51622c3b0e..a5ab485f6a 100644
--- a/cps/cps-service/src/main/java/org/onap/cps/api/CPService.java
+++ b/cps/cps-service/src/main/java/org/onap/cps/api/CpService.java
@@ -27,7 +27,7 @@ import org.opendaylight.yangtools.yang.model.parser.api.YangParserException;
/**
* Configuration and persistency service interface which holds methods for parsing and storing yang models and data.
*/
-public interface CPService {
+public interface CpService {
/**
* Parse and validate a string representing a yang model to generate a schema context.
diff --git a/cps/cps-service/src/main/java/org/onap/cps/api/impl/CPServiceImpl.java b/cps/cps-service/src/main/java/org/onap/cps/api/impl/CpServiceImpl.java
index 5bd6e44906..b71e4714bd 100644
--- a/cps/cps-service/src/main/java/org/onap/cps/api/impl/CPServiceImpl.java
+++ b/cps/cps-service/src/main/java/org/onap/cps/api/impl/CpServiceImpl.java
@@ -26,7 +26,7 @@ import java.io.FileWriter;
import java.io.IOException;
import java.util.Iterator;
import java.util.ServiceLoader;
-import org.onap.cps.api.CPService;
+import org.onap.cps.api.CpService;
import org.onap.cps.spi.ModelPersistencyService;
import org.opendaylight.yangtools.yang.model.api.Module;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
@@ -41,9 +41,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
-public class CPServiceImpl implements CPService {
+public class CpServiceImpl implements CpService {
- private final static Logger LOGGER = LoggerFactory.getLogger(CPServiceImpl.class);
+ private static final Logger LOGGER = LoggerFactory.getLogger(CpServiceImpl.class);
private static final YangParserFactory PARSER_FACTORY;
@@ -65,7 +65,7 @@ public class CPServiceImpl implements CPService {
final File tempFile = File.createTempFile("yang", ".yang");
try (BufferedWriter writer = new BufferedWriter(new FileWriter(tempFile))) {
writer.write(yangModelContent);
- } catch (IOException e) {
+ } catch (final IOException e) {
LOGGER.error("Unable to write to temporary file {}", e.getMessage());
}
return parseAndValidateModel(tempFile);
diff --git a/cps/cps-service/src/main/java/org/onap/cps/spi/ModelPersistencyService.java b/cps/cps-service/src/main/java/org/onap/cps/spi/ModelPersistencyService.java
index e0286c1b2f..f88c6b241b 100644
--- a/cps/cps-service/src/main/java/org/onap/cps/spi/ModelPersistencyService.java
+++ b/cps/cps-service/src/main/java/org/onap/cps/spi/ModelPersistencyService.java
@@ -26,9 +26,10 @@ public interface ModelPersistencyService {
/**
* Store the module from a yang model in the database.
- * @param name
- * @param moduleContent
- * @param revision
+ *
+ * @param name module name
+ * @param moduleContent module content
+ * @param revision module revision
*/
void storeModule(final String name, final String moduleContent, final String revision);
diff --git a/cps/pom.xml b/cps/pom.xml
index 1c1b2b1515..7f50cb1437 100644
--- a/cps/pom.xml
+++ b/cps/pom.xml
@@ -86,9 +86,9 @@
<includeResources>true</includeResources>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<includeTestResources>true</includeTestResources>
- <consoleOutput>true</consoleOutput>
+ <consoleOutput>false</consoleOutput>
<violationSeverity>warning</violationSeverity>
- <failsOnViolation>true</failsOnViolation>
+ <failOnViolation>true</failOnViolation>
</configuration>
</execution>
</executions>
@@ -111,4 +111,4 @@
<module>cps-ri</module>
</modules>
-</project> \ No newline at end of file
+</project>