This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 60fcb5c2d2c1e8871031e8d1667f7d740030c388 Author: Matt Sicker <[email protected]> AuthorDate: Mon Jan 1 18:13:14 2024 -0600 Make LazyUtil.Constant a record Signed-off-by: Matt Sicker <[email protected]> --- .../src/main/java/org/apache/logging/log4j/util/LazyUtil.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/LazyUtil.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/LazyUtil.java index a4eb0e459d..402d8eb43b 100644 --- a/log4j-api/src/main/java/org/apache/logging/log4j/util/LazyUtil.java +++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/LazyUtil.java @@ -39,13 +39,7 @@ final class LazyUtil { return value == NULL ? null : Cast.cast(value); } - static class Constant<T> implements Lazy<T> { - private final T value; - - Constant(final T value) { - this.value = value; - } - + record Constant<T>(T value) implements Lazy<T> { @Override public T get() { return value;
