logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1527860 - /logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/IntegerPatternConverter.java
Date Tue, 01 Oct 2013 03:39:39 GMT
Author: ggregory
Date: Tue Oct  1 03:39:38 2013
New Revision: 1527860

URL: http://svn.apache.org/r1527860
Log:
obj param cannot be both an Integer and a Date, so use an else if.

Modified:
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/IntegerPatternConverter.java

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/IntegerPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/IntegerPatternConverter.java?rev=1527860&r1=1527859&r2=1527860&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/IntegerPatternConverter.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/IntegerPatternConverter.java
Tue Oct  1 03:39:38 2013
@@ -68,9 +68,7 @@ public final class IntegerPatternConvert
     public void format(final Object obj, final StringBuilder toAppendTo) {
         if (obj instanceof Integer) {
             toAppendTo.append(obj.toString());
-        }
-
-        if (obj instanceof Date) {
+        } else if (obj instanceof Date) {
             toAppendTo.append(Long.toString(((Date) obj).getTime()));
         }
     }



Mime
View raw message