You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2022/01/19 14:03:22 UTC
[logging-log4j2] 03/13: In-line single-use local variable.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch release-2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 1b7985773ad3a4290a27a00c4c6d38f76c9db900
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Jan 19 07:49:36 2022 -0500
In-line single-use local variable.
---
log4j-api/src/main/java/org/apache/logging/log4j/Level.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
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 ab2344c..3897040 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
@@ -316,8 +316,7 @@ public final class Level implements Comparable<Level>, Serializable {
* @return An array of Levels.
*/
public static Level[] values() {
- final Collection<Level> values = Level.LEVELS.values();
- return values.toArray(new Level[values.size()]);
+ return Level.LEVELS.values().toArray(new Level[Level.LEVELS.values().size()]);
}
/**