Skip to content

Commit

Permalink
Update Checkstyle to prohibit wildcard imports #347
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Hsu committed Jul 8, 2019
1 parent 8d2b4d4 commit ef43ce1
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 11 deletions.
2 changes: 1 addition & 1 deletion ligradle/checkstyle/linkedin-checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ LinkedIn Java style.

<!-- No imports statements using '*' notation except static imports -->
<module name="AvoidStarImport">
<property name="allowStaticMemberImports" value="true"/>
<property name="allowStaticMemberImports" value="false"/>
</module>
<!-- Do not import 'sun' packages -->
<module name="IllegalImport"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;

import static com.linkedin.tony.TonyConfigurationKeys.*;
import static com.linkedin.tony.TonyConfigurationKeys.TONY_VERSION_INFO_BRANCH;
import static com.linkedin.tony.TonyConfigurationKeys.TONY_VERSION_INFO_CHECKSUM;
import static com.linkedin.tony.TonyConfigurationKeys.TONY_VERSION_INFO_DATE;
import static com.linkedin.tony.TonyConfigurationKeys.TONY_VERSION_INFO_REVISION;
import static com.linkedin.tony.TonyConfigurationKeys.TONY_VERSION_INFO_URL;
import static com.linkedin.tony.TonyConfigurationKeys.TONY_VERSION_INFO_USER;
import static com.linkedin.tony.TonyConfigurationKeys.TONY_VERSION_INFO_VERSION;


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

import static com.linkedin.tony.util.ParserUtils.*;
import static org.mockito.Mockito.*;
import static org.testng.Assert.*;
import static com.linkedin.tony.util.ParserUtils.parseEvents;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.fail;


public class TestEventHandler {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import org.apache.hadoop.yarn.conf.YarnConfiguration;
import org.testng.annotations.Test;

import static org.testng.Assert.*;
import static org.testng.Assert.assertEquals;


public class TestHistoryFileUtils {
Expand Down
11 changes: 9 additions & 2 deletions tony-core/src/test/java/com/linkedin/tony/util/TestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,15 @@
import org.apache.hadoop.yarn.exceptions.YarnException;
import org.testng.annotations.Test;

import static org.mockito.Mockito.*;
import static org.testng.Assert.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertNull;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;


public class TestUtils {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;

import static org.mockito.Mockito.*;



/**
* Ported from Hadoop 2.9.0
Expand Down

0 comments on commit ef43ce1

Please sign in to comment.