Idea中JDK为1.8,还提示Diamond types are not supported at this language level

project的java level 已经核实确实为8,但是IDEA里面仍然会有如下图的提示:
通过查看项目设置,发现project的java level 也是8。

然后继续检查其他模块 如modules ,发现了问题所在。
改为8就好了。
 
遇到类似问题重点排查的位置:
project structure中的project,module中的sources和setting中的java compiler
原文地址:https://www.cnblogs.com/leilong/p/9389502.html