Repository: logging-log4j2 Updated Branches: refs/heads/master 597ec4ecd -> adf0f9881
bugfix: LEVELS field must precede static initializer block Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/adf0f988 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/adf0f988 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/adf0f988 Branch: refs/heads/master Commit: adf0f9881f19222fcce3dac7cf90acadd89a6473 Parents: 597ec4e Author: rpopma <[email protected]> Authored: Thu Sep 24 14:01:15 2015 +0200 Committer: rpopma <[email protected]> Committed: Thu Sep 24 14:01:15 2015 +0200 ---------------------------------------------------------------------- .../java/org/apache/logging/log4j/Level.java | 21 ++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/adf0f988/log4j-api/src/main/java/org/apache/logging/log4j/Level.java ---------------------------------------------------------------------- diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/Level.java b/log4j-api/src/main/java/org/apache/logging/log4j/Level.java index 803799e..97a6e7c 100644 --- a/log4j-api/src/main/java/org/apache/logging/log4j/Level.java +++ b/log4j-api/src/main/java/org/apache/logging/log4j/Level.java @@ -84,6 +84,15 @@ public final class Level implements Comparable<Level>, Serializable { */ public static final Level ALL; + /** + * @since 2.1 + */ + public static final String CATEGORY = "Level"; + + private static final ConcurrentMap<String, Level> LEVELS = new ConcurrentHashMap<>(); // SUPPRESS CHECKSTYLE + + private static final long serialVersionUID = 1581082L; + static { OFF = new Level("OFF", StandardLevel.OFF.intLevel()); FATAL = new Level("FATAL", StandardLevel.FATAL.intLevel()); @@ -95,14 +104,6 @@ public final class Level implements Comparable<Level>, Serializable { ALL = new Level("ALL", StandardLevel.ALL.intLevel()); } - /** - * @since 2.1 - */ - public static final String CATEGORY = "Level"; - - private static final long serialVersionUID = 1581082L; - private static final ConcurrentMap<String, Level> LEVELS = new ConcurrentHashMap<>(); - private final String name; private final int intLevel; private final StandardLevel standardLevel; @@ -177,8 +178,8 @@ public final class Level implements Comparable<Level>, Serializable { @Override @SuppressWarnings("CloneDoesntCallSuperClone") - public Level clone() throws CloneNotSupportedException { - throw new CloneNotSupportedException(); + public Level clone() throws CloneNotSupportedException { // SUPPRESS CHECKSTYLE + throw new CloneNotSupportedException(); // SUPPRESS CHECKSTYLE } @Override
