diff --git a/.editorconfig b/.editorconfig index b96e2b9c6e8..efb1e9d7c8f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -30,6 +30,12 @@ trim_trailing_whitespace=true ij_continuation_indent_size = 4 ij_java_wrap_comments = true ij_any_indent_case_from_switch = false +ij_java_imports_layout = $*,|,*,|,java.**,javax.** +ij_java_layout_static_imports_separately = true +ij_java_use_single_class_imports = true +ij_java_class_count_to_use_import_on_demand = 99 +ij_java_names_count_to_use_import_on_demand = 99 + [*.{avsc,avpr,avdl}] indent_style = space diff --git a/lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java b/lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java index 2fd3103a4ef..cad00e943f2 100644 --- a/lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java +++ b/lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java @@ -17,6 +17,8 @@ */ package org.apache.avro.compiler.specific; +import static java.nio.charset.StandardCharsets.UTF_8; + import org.apache.avro.Conversion; import org.apache.avro.Conversions; import org.apache.avro.JsonProperties; @@ -61,8 +63,6 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import static java.nio.charset.StandardCharsets.UTF_8; - /** * Generate specific Java interfaces and classes for protocols and schemas. *

diff --git a/lang/java/compiler/src/test/java/org/apache/avro/compiler/specific/TestSpecificCompiler.java b/lang/java/compiler/src/test/java/org/apache/avro/compiler/specific/TestSpecificCompiler.java index d1338590b78..19d63d033c7 100644 --- a/lang/java/compiler/src/test/java/org/apache/avro/compiler/specific/TestSpecificCompiler.java +++ b/lang/java/compiler/src/test/java/org/apache/avro/compiler/specific/TestSpecificCompiler.java @@ -17,6 +17,15 @@ */ package org.apache.avro.compiler.specific; +import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.CoreMatchers.hasItem; +import static org.hamcrest.CoreMatchers.not; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + import org.apache.avro.AvroTypeException; import org.apache.avro.LogicalType; import org.apache.avro.LogicalTypes; @@ -54,15 +63,6 @@ import javax.tools.StandardJavaFileManager; import javax.tools.ToolProvider; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.hasItem; -import static org.hamcrest.CoreMatchers.not; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; - public class TestSpecificCompiler { private static final Logger LOG = LoggerFactory.getLogger(TestSpecificCompiler.class);