IS: Add CheckStyle goal to Maven
Issue-ID: CCSDK-2746
https: //jira.onap.org/browse/CCSDK-2746
Change-Id: I0442b62cbecb16c979a43d3d5d68fdb1c62a2276
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 d2f1a3e..dc64110 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.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 @@
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
similarity index 98%
rename from cps/cps-service/src/main/java/org/onap/cps/api/CPService.java
rename to cps/cps-service/src/main/java/org/onap/cps/api/CpService.java
index 51622c3..a5ab485 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 @@
/**
* 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
similarity index 94%
rename from cps/cps-service/src/main/java/org/onap/cps/api/impl/CPServiceImpl.java
rename to cps/cps-service/src/main/java/org/onap/cps/api/impl/CpServiceImpl.java
index 5bd6e44..b71e471 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.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.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 @@
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 e0286c1..f88c6b2 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 @@
/**
* 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 1c1b2b1..7f50cb1 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>