You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Xiao Yu (Jira)" <ji...@apache.org> on 2021/04/15 04:03:00 UTC

[jira] [Commented] (HBASE-25776) Use Class.asSubclass to fix the warning in StochasticLoadBalancer.loadCustomCostFunctions

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

Xiao Yu commented on HBASE-25776:
---------------------------------

I will fix it

> Use Class.asSubclass to fix the warning in StochasticLoadBalancer.loadCustomCostFunctions
> -----------------------------------------------------------------------------------------
>
>                 Key: HBASE-25776
>                 URL: https://issues.apache.org/jira/browse/HBASE-25776
>             Project: HBase
>          Issue Type: Improvement
>          Components: Balancer
>            Reporter: Duo Zhang
>            Priority: Minor
>              Labels: beginner, trivial
>
> {code}
>  klass = (Class<? extends CostFunction>) Class.forName(c);
> {code}
> This will generated  a warning of unchecked casting, could simply use Class.forName(c).asSubclass(CostFunction.class).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)