具体报错内容如下:
This inspection finds all usages of methods that have @since tag in their documentation. This may be useful when development is performed under newer SDK version as the target platform for production
报错图:
看代码意思是,那个方法是自Java1.6开始的,但是,你的language level 才是5,级别不够,所以,就报错了。
根本的解决办法是在maven中设置编译级别
<properties>
<java-version>1.7</java-version>
</properties>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>${java-version}</source>
<target>${java-version}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>