summaryrefslogtreecommitdiffstats
path: root/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-09-13 15:25:32 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-09-13 15:26:47 +0100
commit4cfa2e2d98f6877d54da304ef17f096284430908 (patch)
treec9452d2bf6bb96fae9c1e8e2d8ce8f8d01e69d22 /plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main
parent0e23f7634e1e1fb31454c516974613335fcea1a4 (diff)
Sonar/Checkstyle in service/plugins
Sonar and Checkstyle changes in plugins and services, and knock on changes Issue-ID: POLICY-1034 Change-Id: Iff7df74e54fce2c661dcc2fae75ae93d4cacfe5b Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main')
-rw-r--r--plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/Apex2XmlEventConverter.java (renamed from plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/Apex2XMLEventConverter.java)18
-rw-r--r--plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/XmlEventProtocolParameters.java (renamed from plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/XMLEventProtocolParameters.java)8
2 files changed, 14 insertions, 12 deletions
diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/Apex2XMLEventConverter.java b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/Apex2XmlEventConverter.java
index 76bae6833..767c24fdd 100644
--- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/Apex2XMLEventConverter.java
+++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/Apex2XmlEventConverter.java
@@ -56,8 +56,8 @@ import org.xml.sax.SAXException;
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
-public final class Apex2XMLEventConverter implements ApexEventProtocolConverter {
- private static final XLogger LOGGER = XLoggerFactory.getXLogger(Apex2XMLEventConverter.class);
+public final class Apex2XmlEventConverter implements ApexEventProtocolConverter {
+ private static final XLogger LOGGER = XLoggerFactory.getXLogger(Apex2XmlEventConverter.class);
private static final String MODEL_SCHEMA_NAME = "xml/apex-event.xsd";
@@ -71,11 +71,11 @@ public final class Apex2XMLEventConverter implements ApexEventProtocolConverter
*
* @throws ApexEventException the apex event exception
*/
- public Apex2XMLEventConverter() throws ApexEventException {
+ public Apex2XmlEventConverter() throws ApexEventException {
try {
- final URL schemaURL = ResourceUtils.getUrlResource(MODEL_SCHEMA_NAME);
+ final URL schemaUrl = ResourceUtils.getUrlResource(MODEL_SCHEMA_NAME);
final Schema apexEventSchema =
- SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(schemaURL);
+ SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(schemaUrl);
final JAXBContext jaxbContext = JAXBContext.newInstance(XMLApexEvent.class);
@@ -101,7 +101,9 @@ public final class Apex2XMLEventConverter implements ApexEventProtocolConverter
* parameters. eventprotocol.EventProtocolParameters)
*/
@Override
- public void init(final EventProtocolParameters parameters) {}
+ public void init(final EventProtocolParameters parameters) {
+ // No initialization necessary on this class
+ }
/*
* (non-Javadoc)
@@ -149,7 +151,7 @@ public final class Apex2XMLEventConverter implements ApexEventProtocolConverter
}
// Return the event in a single element
- final ArrayList<ApexEvent> eventList = new ArrayList<ApexEvent>();
+ final ArrayList<ApexEvent> eventList = new ArrayList<>();
eventList.add(apexEvent);
return eventList;
}
@@ -170,7 +172,7 @@ public final class Apex2XMLEventConverter implements ApexEventProtocolConverter
}
// Get the Apex event data
- final List<XMLApexEventData> xmlDataList = new ArrayList<XMLApexEventData>();
+ final List<XMLApexEventData> xmlDataList = new ArrayList<>();
try {
for (final Entry<String, Object> apexDataEntry : apexEvent.entrySet()) {
diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/XMLEventProtocolParameters.java b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/XmlEventProtocolParameters.java
index 0eeb497a1..9f0ee0795 100644
--- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/XMLEventProtocolParameters.java
+++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/XmlEventProtocolParameters.java
@@ -27,7 +27,7 @@ import org.onap.policy.apex.service.parameters.eventprotocol.EventProtocolTextTo
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
-public class XMLEventProtocolParameters extends EventProtocolTextTokenDelimitedParameters {
+public class XmlEventProtocolParameters extends EventProtocolTextTokenDelimitedParameters {
/** The label of this carrier technology. */
public static final String XML_EVENT_PROTOCOL_LABEL = "XML";
@@ -38,8 +38,8 @@ public class XMLEventProtocolParameters extends EventProtocolTextTokenDelimitedP
* Constructor to create a JSON event protocol parameter instance and register the instance with the parameter
* service.
*/
- public XMLEventProtocolParameters() {
- super(XMLEventProtocolParameters.class.getCanonicalName());
+ public XmlEventProtocolParameters() {
+ super(XmlEventProtocolParameters.class.getCanonicalName());
// Set the event protocol properties for the XML event protocol
this.setLabel(XML_EVENT_PROTOCOL_LABEL);
@@ -48,6 +48,6 @@ public class XMLEventProtocolParameters extends EventProtocolTextTokenDelimitedP
this.setStartDelimiterToken(XML_TEXT_DELIMITER_TOKEN);
// Set the event protocol plugin class
- this.setEventProtocolPluginClass(Apex2XMLEventConverter.class.getCanonicalName());
+ this.setEventProtocolPluginClass(Apex2XmlEventConverter.class.getCanonicalName());
}
}