You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2021/06/26 21:38:01 UTC
[logging-log4j2] branch master updated: Fix compile error
This is an automated email from the ASF dual-hosted git repository.
mattsicker pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
The following commit(s) were added to refs/heads/master by this push:
new 5b28850 Fix compile error
5b28850 is described below
commit 5b28850802c01905fbedcf9a5a3f35d89ee9d429
Author: Matt Sicker <bo...@gmail.com>
AuthorDate: Sat Jun 26 16:37:50 2021 -0500
Fix compile error
---
.../logging/log4j/core/tools/picocli/CommandLine.java | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/tools/picocli/CommandLine.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/tools/picocli/CommandLine.java
index bce2107..53be223 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/tools/picocli/CommandLine.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/tools/picocli/CommandLine.java
@@ -16,6 +16,10 @@
*/
package org.apache.logging.log4j.core.tools.picocli;
+import org.apache.logging.log4j.core.tools.picocli.CommandLine.Help.Ansi.IStyle;
+import org.apache.logging.log4j.core.tools.picocli.CommandLine.Help.Ansi.Style;
+import org.apache.logging.log4j.core.tools.picocli.CommandLine.Help.Ansi.Text;
+
import java.io.File;
import java.io.PrintStream;
import java.lang.annotation.ElementType;
@@ -64,10 +68,6 @@ import java.util.UUID;
import java.util.concurrent.Callable;
import java.util.regex.Pattern;
-import org.apache.logging.log4j.core.tools.picocli.CommandLine.Help.Ansi.IStyle;
-import org.apache.logging.log4j.core.tools.picocli.CommandLine.Help.Ansi.Style;
-import org.apache.logging.log4j.core.tools.picocli.CommandLine.Help.Ansi.Text;
-
import static java.util.Locale.ENGLISH;
import static org.apache.logging.log4j.core.tools.picocli.CommandLine.Help.Column.Overflow.SPAN;
import static org.apache.logging.log4j.core.tools.picocli.CommandLine.Help.Column.Overflow.TRUNCATE;
@@ -2570,13 +2570,6 @@ public class CommandLine {
return result;
}
if (type.isEnum()) {
- return new ITypeConverter<Object>() {
- @Override
- @SuppressWarnings("unchecked")
- public Object convert(final String value) throws Exception {
- return Enum.valueOf((Class<Enum>) type, value);
- }
- };
return (ITypeConverter<Object>) value -> Enum.valueOf((Class<Enum>) type, value);
}
throw new MissingTypeConverterException(CommandLine.this, "No TypeConverter registered for " + type.getName() + " of field " + field);