使用Class.cast()取消选中转换

时间:2015-10-07 08:36:52

标签: java generics casting warnings unchecked

我的目标是修复以下警告

set_select('taskOption1', $rows[0] -> stage_reject_id, TRUE)

这是我班级的代码

[unchecked] unchecked conversion
            retValue = WidgetSelectionModel.class.cast(new EllipseSelectionModelImpl(canBeSelected));
  required: WidgetSelectionModel<T>
  found:    WidgetSelectionModel
  where T is a type-variable:
    T extends Shape declared in method <T>getSelectionModel(Class<T>,boolean)

0 个答案:

没有答案