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

[jira] [Assigned] (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:all-tabpanel ]

Duo Zhang reassigned HBASE-25776:
---------------------------------

    Assignee: Xiao Yu

> 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
>            Assignee: Xiao Yu
>            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)