You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ni...@apache.org on 2014/10/11 06:13:05 UTC
[19/50] [abbrv] git commit: Fixing a minor sonar issue - using
all-caps for static final variables.
Fixing a minor sonar issue - using all-caps for static final variables.
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/f5c34c0e
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/f5c34c0e
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/f5c34c0e
Branch: refs/heads/master
Commit: f5c34c0eb9cc878b035030fe5576a7354a4ea0c7
Parents: a7c0134
Author: Nirmal Fernando <ni...@gmail.com>
Authored: Thu Oct 9 18:55:46 2014 +0530
Committer: Nirmal Fernando <ni...@gmail.com>
Committed: Sat Oct 11 09:30:56 2014 +0530
----------------------------------------------------------------------
.../controller/axiom/AxiomXpathParserUtil.java | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/f5c34c0e/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/axiom/AxiomXpathParserUtil.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/axiom/AxiomXpathParserUtil.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/axiom/AxiomXpathParserUtil.java
index f10e4cc..62eec5f 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/axiom/AxiomXpathParserUtil.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/axiom/AxiomXpathParserUtil.java
@@ -56,7 +56,9 @@ import java.util.*;
*/
public class AxiomXpathParserUtil {
- private static final Log log = LogFactory.getLog(AxiomXpathParserUtil.class);
+ private static final Log LOG = LogFactory.getLog(AxiomXpathParserUtil.class);
+
+ private AxiomXpathParserUtil(){}
public static OMElement parse(File xmlSource) throws MalformedConfigurationFileException,
IllegalArgumentException {
@@ -65,7 +67,7 @@ public class AxiomXpathParserUtil {
if (xmlSource == null) {
String msg = "File is null.";
- log.error(msg);
+ LOG.error(msg);
throw new IllegalArgumentException(msg);
}
@@ -75,11 +77,11 @@ public class AxiomXpathParserUtil {
} catch (XMLStreamException e) {
String msg = "Failed to parse the configuration file : " + xmlSource.getPath();
- log.error(msg, e);
+ LOG.error(msg, e);
throw new MalformedConfigurationFileException(msg, e);
} catch (FileNotFoundException e) {
String msg = "Configuration file cannot be found : " + xmlSource.getPath();
- log.error(msg);
+ LOG.error(msg);
throw new MalformedConfigurationFileException(msg);
}
@@ -134,13 +136,13 @@ public class AxiomXpathParserUtil {
private static void neglectingWarn(final String fileName, final String elt, final int size) {
if (size > 1) {
- log.warn(fileName + " contains more than one " + elt + " elements!" +
+ LOG.warn(fileName + " contains more than one " + elt + " elements!" +
" Elements other than the first will be neglected.");
}
}
public static void plainTextWarn(final String elt) {
- log.warn("Unable to find a value for " + elt + " element from Secure Vault." +
+ LOG.warn("Unable to find a value for " + elt + " element from Secure Vault." +
"Hence we will try to assign the plain text value (if specified).");
}
@@ -162,7 +164,7 @@ public class AxiomXpathParserUtil {
return nodeList.isEmpty() ? null : nodeList.get(0);
} catch (JaxenException e) {
String msg = "Error occurred while reading the Xpath (" + xpath + ")";
- log.error(msg, e);
+ LOG.error(msg, e);
throw new MalformedConfigurationFileException(msg, e);
}
@@ -184,7 +186,7 @@ public class AxiomXpathParserUtil {
return nodeList;
} catch (JaxenException e) {
String msg = "Error occurred while reading the Xpath (" + xpath + ")";
- log.error(msg, e);
+ LOG.error(msg, e);
throw new MalformedConfigurationFileException(msg, e);
}
@@ -208,7 +210,7 @@ public class AxiomXpathParserUtil {
return nodeList;
} catch (JaxenException e) {
String msg = "Error occurred while reading the Xpath (" + xpath + ")";
- log.error(msg, e);
+ LOG.error(msg, e);
throw new MalformedConfigurationFileException(msg, e);
}