[
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)