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 <[email protected]>
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()]);
     }
 
     /**

Reply via email to