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

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

Duo Zhang created HBASE-25776:
---------------------------------

             Summary: 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


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