Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-25776

Use Class.asSubclass to fix the warning in StochasticLoadBalancer.loadCustomCostFunctions

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

       klass = (Class<? extends CostFunction>) Class.forName(c);
      

      This will generated a warning of unchecked casting, could simply use Class.forName(c).asSubclass(CostFunction.class).

      Attachments

        Issue Links

          Activity

            People

              xiaoyu Yu Xiao
              zhangduo Duo Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: