diff options
author | liamfallon <liam.fallon@ericsson.com> | 2018-09-13 15:25:32 +0100 |
---|---|---|
committer | liamfallon <liam.fallon@ericsson.com> | 2018-09-13 15:26:47 +0100 |
commit | 4cfa2e2d98f6877d54da304ef17f096284430908 (patch) | |
tree | c9452d2bf6bb96fae9c1e8e2d8ce8f8d01e69d22 /core | |
parent | 0e23f7634e1e1fb31454c516974613335fcea1a4 (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 'core')
7 files changed, 22 insertions, 22 deletions
diff --git a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/ApexDeploymentException.java b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/ApexDeploymentException.java index e932bbd45..5944b9f0d 100644 --- a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/ApexDeploymentException.java +++ b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/ApexDeploymentException.java @@ -43,9 +43,9 @@ public class ApexDeploymentException extends ApexException { * Instantiates a new apex deployment exception. * * @param message the message - * @param e the e + * @param exception the e */ - public ApexDeploymentException(final String message, final Exception e) { - super(message, e); + public ApexDeploymentException(final String message, final Exception exception) { + super(message, exception); } } diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/MessagingException.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/MessagingException.java index ef435b2a5..dfaf4629f 100644 --- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/MessagingException.java +++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/MessagingException.java @@ -41,9 +41,9 @@ public class MessagingException extends Exception { * Instantiates a new messaging exception. * * @param message the message - * @param e the e + * @param exception the e */ - public MessagingException(final String message, final Exception e) { - super(message, e); + public MessagingException(final String message, final Exception exception) { + super(message, exception); } } diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/threading/ApplicationThreadFactory.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/threading/ApplicationThreadFactory.java index 45579c7ba..0d5f30737 100644 --- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/threading/ApplicationThreadFactory.java +++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/threading/ApplicationThreadFactory.java @@ -78,12 +78,12 @@ public class ApplicationThreadFactory implements ThreadFactory { * @see java.util.concurrent.ThreadFactory#newThread(java.lang.Runnable) */ @Override - public Thread newThread(final Runnable r) { + public Thread newThread(final Runnable runnable) { final Thread thisThread; if (stackSize > 0) { - thisThread = new Thread(group, r, name + ':' + nextThreadNumber.getAndIncrement(), stackSize); + thisThread = new Thread(group, runnable, name + ':' + nextThreadNumber.getAndIncrement(), stackSize); } else { - thisThread = new Thread(group, r, name + ':' + nextThreadNumber.getAndIncrement()); + thisThread = new Thread(group, runnable, name + ':' + nextThreadNumber.getAndIncrement()); } if (thisThread.isDaemon()) { thisThread.setDaemon(false); diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/xml/XPathReader.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/xml/XPathReader.java index f677e6b4a..bd2474339 100644 --- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/xml/XPathReader.java +++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/xml/XPathReader.java @@ -45,7 +45,7 @@ public class XPathReader { private String xmlFileName = null; private InputStream xmlStream = null; private Document xmlDocument; - private XPath xPath; + private XPath xpath; /** * Construct Reader for the file passed in. @@ -89,7 +89,7 @@ public class XPathReader { return; } - xPath = XPathFactory.newInstance().newXPath(); + xpath = XPathFactory.newInstance().newXPath(); LOGGER.info("Initialized XPath reader"); } catch (final Exception ex) { LOGGER.error("Error parsing XML file/stream from XPath reading, reason :\n" + ex.getMessage()); @@ -105,7 +105,7 @@ public class XPathReader { */ public Object read(final String expression, final QName returnType) { try { - final XPathExpression xPathExpression = xPath.compile(expression); + final XPathExpression xPathExpression = xpath.compile(expression); return xPathExpression.evaluate(xmlDocument, returnType); } catch (final XPathExpressionException ex) { LOGGER.error("Failed to read XML file for XPath processing, reason:\n" + ex.getMessage()); diff --git a/core/core-protocols/src/main/java/org/onap/policy/apex/core/protocols/Action.java b/core/core-protocols/src/main/java/org/onap/policy/apex/core/protocols/Action.java index 62a2e0a75..00d8055be 100644 --- a/core/core-protocols/src/main/java/org/onap/policy/apex/core/protocols/Action.java +++ b/core/core-protocols/src/main/java/org/onap/policy/apex/core/protocols/Action.java @@ -29,7 +29,7 @@ package org.onap.policy.apex.core.protocols; public interface Action { /** - * This method returns a string representation of each action. + * Return a string representation of each action. * * @return the action string */ diff --git a/core/core-protocols/src/main/java/org/onap/policy/apex/core/protocols/Message.java b/core/core-protocols/src/main/java/org/onap/policy/apex/core/protocols/Message.java index 73465cef6..95f786cad 100644 --- a/core/core-protocols/src/main/java/org/onap/policy/apex/core/protocols/Message.java +++ b/core/core-protocols/src/main/java/org/onap/policy/apex/core/protocols/Message.java @@ -146,15 +146,15 @@ public abstract class Message implements Serializable { * @see java.lang.Object#equals(java.lang.Object) */ @Override - public boolean equals(final Object o) { - if (this == o) { + public boolean equals(final Object object) { + if (this == object) { return true; } - if (o == null || getClass() != o.getClass()) { + if (object == null || getClass() != object.getClass()) { return false; } - final Message message = (Message) o; + final Message message = (Message) object; if (action != null ? !action.equals(message.action) : message.action != null) { return false; diff --git a/core/core-protocols/src/main/java/org/onap/policy/apex/core/protocols/engdep/messages/Response.java b/core/core-protocols/src/main/java/org/onap/policy/apex/core/protocols/engdep/messages/Response.java index 69e36baed..530e1aba7 100644 --- a/core/core-protocols/src/main/java/org/onap/policy/apex/core/protocols/engdep/messages/Response.java +++ b/core/core-protocols/src/main/java/org/onap/policy/apex/core/protocols/engdep/messages/Response.java @@ -99,18 +99,18 @@ public class Response extends Message { * @see org.onap.policy.apex.core.protocols.Message#equals(java.lang.Object) */ @Override - public boolean equals(final Object o) { - if (this == o) { + public boolean equals(final Object object) { + if (this == object) { return true; } - if (o == null || getClass() != o.getClass()) { + if (object == null || getClass() != object.getClass()) { return false; } - if (!super.equals(o)) { + if (!super.equals(object)) { return false; } - final Response response = (Response) o; + final Response response = (Response) object; if (successful != response.successful) { return false; |