Author: manik.surtani(a)jboss.com
Date: 2009-01-02 12:01:44 -0500 (Fri, 02 Jan 2009)
New Revision: 7342
Modified:
core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java
Log:
Removed unnecessary logging noise
Modified: core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java 2008-12-19
16:10:30 UTC (rev 7341)
+++
core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java 2009-01-02
17:01:44 UTC (rev 7342)
@@ -120,7 +120,9 @@
{
org.w3c.dom.Node node = list.item(s);
if (node.getNodeType() != org.w3c.dom.Node.ELEMENT_NODE)
+ {
continue;
+ }
Element element = (Element) node;
String name = element.getAttribute(attributeName);
@@ -165,7 +167,9 @@
{
org.w3c.dom.Node node = list.item(s);
if (node.getNodeType() != org.w3c.dom.Node.ELEMENT_NODE)
+ {
continue;
+ }
Element element = (Element) node;
String value = element.getAttribute(attributeName);
@@ -222,7 +226,9 @@
}
} // end of for ()
if (trim)
+ {
attributeText = attributeText.trim();
+ }
return attributeText;
}
@@ -248,7 +254,9 @@
{
String value = node2.getNodeValue();
if (value == null)
+ {
return "";
+ }
return StringPropertyReplacer.replaceProperties(value.trim());
}
else
@@ -276,7 +284,9 @@
char curr = buf.charAt(looper);
char next = 0;
if (looper + 1 < buf.length())
+ {
next = buf.charAt(looper + 1);
+ }
if (curr == '\\')
{
@@ -418,7 +428,9 @@
{
Node child = element.getFirstChild();
while (child != null && child.getNodeType() != Node.ELEMENT_NODE)
+ {
child = child.getNextSibling();
+ }
return (Element) child;
}
@@ -473,7 +485,7 @@
if (val != null &&
(val.equalsIgnoreCase("true") ||
val.equalsIgnoreCase("false")))
{
- return Boolean.valueOf(val);
+ return Boolean.valueOf(val);
}
return defaultValue;
@@ -507,9 +519,7 @@
}
catch (NoSuchMethodException me)
{
- // this is ok, but certainly log this as a warning
- // this is hugely noisy!
- if (log.isTraceEnabled()) log.trace("Unrecognised attribute " +
propName + ". Please check your configuration. Ignoring!!");
+ // try other setters that may fit later on. Don't throw this exception
though.
}
catch (Exception e)
{
@@ -526,7 +536,9 @@
if (paramTypes.length != 1)
{
if (log.isTraceEnabled())
+ {
log.trace("Rejecting setter " + m + " on class "
+ objectClass + " due to incorrect number of parameters");
+ }
continue; // try another param with the same name.
}
@@ -555,7 +567,9 @@
}
}
if (!setterFound && failOnMissingSetter)
+ {
throw new ConfigurationException("Couldn't find a setter named
[" + setter + "] which takes a single parameter, for parameter " + propName
+ " on class [" + objectClass + "]");
+ }
}
}
Show replies by date