今天新来的小伙子让我帮忙看一个bug,在for遍历List时提示ClassCastException。

伪代码  for(Order order : model.getOrderList)...

debug之后发现OrderList里放的是Object[]数组,于是追到了注入的位置

orderList = (ArrayList<OrderList>) query.list(); 这里强转失败了,但没有报错。

 泛型擦除等未完待续。。。

 

插一个作用域的帖子: capture variables, Shadowing  http://blog.csdn.net/forevervip/article/details/44208329

相关文章:

  • 2021-09-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-24
  • 2021-08-03
  • 2021-05-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-26
  • 2022-01-13
  • 2021-08-04
相关资源
相似解决方案