This is my personal opinion, but I don't like wildcard imports in general.
One example is that it makes it harder to determine the API impact when
reviewing a patch that changes the version of a JAR. Given that IDEs manage
imports for you, I don't see much benefit from wildcard imports either.

On Fri, Jun 23, 2017 at 2:29 AM, Steve Loughran <ste...@hortonworks.com>
wrote:

>
>
> I've justone a patch for HADOOP-15553 -moving Azure module to the parallel
> integration tests of hadoop-aws, and now checkstyle is telling me off for
> the same static .* imports as I've been using up till now
>
>
> org.apache.hadoop.fs.azure.metrics.AzureFileSystemInstrumentation.
> [UnusedImports]
> ./hadoop-tools/hadoop-azure/src/test/java/org/apache/
> hadoop/fs/azure/integration/AzureTestUtils.java:38:import static
> org.apache.hadoop.fs.azure.integration.AzureTestConstants.*;: Using the
> '.*' form of import should be avoided - org.apache.hadoop.fs.azure.
> integration.AzureTestConstants.*. [AvoidStarImport]
> ./hadoop-tools/hadoop-azure/src/test/java/org/apache/
> hadoop/fs/azure/integration/AzureTestUtils.java:273:    return
> testUniqueForkId == null ? defVal ::46: ':' should be on a new line.
> [OperatorWrap]
> ./hadoop-tools/hadoop-azure/src/test/java/org/apache/
> hadoop/fs/azure/integration/ITestAzureHugeFiles.java:42:import static
> org.apache.hadoop.fs.azure.integration.AzureTestUtils.*;: Using the '.*'
> form of import should be avoided - 
> org.apache.hadoop.fs.azure.integration.AzureTestUtils.*.
> [AvoidStarImport]
> ./hadoop-tools/hadoop-azure/src/test/java/org/apache/
> hadoop/fs/azure/integration/ITestAzureHugeFiles.java:43:import static
> org.apache.hadoop.fs.contract.ContractTestUtils.*;: Using the '.*' form
> of import should be avoided -
>
> I know we mustn't use that for importing all the classes in a package, but
> we've never had any restrictions on using it for static imports until now
>

Reply via email to