You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by ca...@apache.org on 2010/10/31 21:36:35 UTC
svn commit: r1029488 - in
/logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j:
extras/DOMConfigurator.java
pattern/ThrowableInformationPatternConverter.java rule/RuleFactory.java
Author: carnold
Date: Sun Oct 31 20:36:34 2010
New Revision: 1029488
URL: http://svn.apache.org/viewvc?rev=1029488&view=rev
Log:
Eliminate some PMD warnings
Modified:
logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j/extras/DOMConfigurator.java
logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j/pattern/ThrowableInformationPatternConverter.java
logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j/rule/RuleFactory.java
Modified: logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j/extras/DOMConfigurator.java
URL: http://svn.apache.org/viewvc/logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j/extras/DOMConfigurator.java?rev=1029488&r1=1029487&r2=1029488&view=diff
==============================================================================
--- logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j/extras/DOMConfigurator.java (original)
+++ logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j/extras/DOMConfigurator.java Sun Oct 31 20:36:34 2010
@@ -851,10 +851,9 @@ public class DOMConfigurator implements
//
String resetAttrib = subst(element.getAttribute(RESET_ATTR));
LogLog.debug("reset attribute= \"" + resetAttrib +"\".");
- if(!("".equals(resetAttrib))) {
- if (OptionConverter.toBoolean(resetAttrib, false)) {
- repository.resetConfiguration();
- }
+ if(!("".equals(resetAttrib)) &&
+ OptionConverter.toBoolean(resetAttrib, false)) {
+ repository.resetConfiguration();
}
Modified: logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j/pattern/ThrowableInformationPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j/pattern/ThrowableInformationPatternConverter.java?rev=1029488&r1=1029487&r2=1029488&view=diff
==============================================================================
--- logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j/pattern/ThrowableInformationPatternConverter.java (original)
+++ logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j/pattern/ThrowableInformationPatternConverter.java Sun Oct 31 20:36:34 2010
@@ -57,6 +57,7 @@ public class ThrowableInformationPattern
try {
maxLines = Integer.parseInt(options[0]);
} catch(NumberFormatException ex) {
+ maxLines = Integer.MAX_VALUE;
}
}
}
Modified: logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j/rule/RuleFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j/rule/RuleFactory.java?rev=1029488&r1=1029487&r2=1029488&view=diff
==============================================================================
--- logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j/rule/RuleFactory.java (original)
+++ logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j/rule/RuleFactory.java Sun Oct 31 20:36:34 2010
@@ -17,12 +17,9 @@
package org.apache.log4j.rule;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
import java.util.Collection;
import java.util.LinkedList;
import java.util.Stack;
-import org.apache.log4j.LogManager;
/**
* A Factory class which, given a string representation of the rule,
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org