logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1581082 - /logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/Level.java
Date Mon, 24 Mar 2014 21:49:16 GMT
Author: ggregory
Date: Mon Mar 24 21:49:15 2014
New Revision: 1581082

URL: http://svn.apache.org/r1581082
Log:
Fix level comparisons, version 1 and 2 are opposites in usage of internal level ints!

Modified:
    logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/Level.java

Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/Level.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/Level.java?rev=1581082&r1=1581081&r2=1581082&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/Level.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/Level.java
Mon Mar 24 21:49:15 2014
@@ -153,7 +153,7 @@ public final class Level implements Comp
      * @return True if the given Level is less specific or the same than this Level.
      */
     public boolean isGreaterOrEqual(final int level) {
-        return this.intLevel >= level;
+        return this.intLevel <= level;
     }
 
     /**
@@ -163,7 +163,7 @@ public final class Level implements Comp
      * @return True if the given Level is less specific or the same than this Level.
      */
     public boolean isGreaterOrEqual(final Level level) {
-        return this.intLevel >= level.intLevel;
+        return this.intLevel <= level.intLevel;
     }
 
     /**



Mime
View raw message