[ 
https://issues.apache.org/jira/browse/HBASE-21341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16656145#comment-16656145
 ] 

Duo Zhang commented on HBASE-21341:
-----------------------------------

I do no think checkstyle is strong enough. We sometimes want to fix the issue 
at the commit time but then forget. Or when solving the conflicts when 
backporting, we introduce the unexpected imports. Usually I will run a mvn 
clean install to confirm that there is no compile error, but I will not run 
checkstyle to see if there are new warnings, and after committing, it is also 
not easy to find out we have introduced new checkstyle warnings.

https://github.com/skuzzle/restrict-imports-enforcer-rule

There is a maven enforcer rule for forbidding invalid imports, it will lead to 
a compile error if there are invalid imports. I think this is a good way. But 
the problem is that, we use maven enforcer 3.0.0-M2, which is not a formal 
release version, and the author haven't published the plugin for 3.0.0-M2...

> DeadServer shouldn't import unshaded Preconditions
> --------------------------------------------------
>
>                 Key: HBASE-21341
>                 URL: https://issues.apache.org/jira/browse/HBASE-21341
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: Ted Yu
>            Priority: Major
>         Attachments: 21341.v1.txt
>
>
> DeadServer currently imports unshaded Preconditions :
> {code}
> import com.google.common.base.Preconditions;
> {code}
> We should import shaded version of Preconditions.
> This is the only place where unshaded class from com.google.common is imported



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to