Code compiler error between IDE language level 7 and 8

心不动则不痛 提交于 2020-01-07 04:15:25

问题


List<Restriction> restrictions = new ArrayList<>();
//list operation.......
when(restrictionUpdator.executeBatch(anyInt(), 
                                     any(List.class), 
                                     any(RequestorInfo.class),
                                     (Class<Obj>) any())
     ).thenReturn(restrictions);

excuteBatch method:

public <T extends Obj> List<T> executeBatch(int Id, 
                                                List<UpdateContext> contexts,
                                                RequestorInfo requestor, 
                                                Class<T> tClass)

Class:

public class Restriction extends Obj

Can someone have a look?
Why above code has compiler error in IDE language 8?
If I change IDE language 8 to 7, it is back to normal and build success.

来源:https://stackoverflow.com/questions/44178932/code-compiler-error-between-ide-language-level-7-and-8

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!