I develop a Java library which is intended for applications based on JDK5. Tools used to build applications require JDK7 or bigger. I use version 8 update 45:
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
After the analysis I received a lot of False Positives on methods that are implementing interface specification, e.g:
public interface FileScanner {
Collection<File> getFiles(File directory, String[] includes, String[] excludes);
}
(see full sources: https://github.com/gabrysbiz/maven-plugin-utils)
I found that rule makes decisions based on bytecode (see Jira ticket). My class major version is equal to 49 which is related to JDK5 (see major version numbers)
$ javap -verbose AntFileScanner.class
Classfile /D:/Projects/maven-plugin-utils/sources/plugin-utils/target/classes/biz/gabrys/maven/plugin/util/io/AntFileScanner.class
Last modified 2015-07-16; size 1881 bytes
MD5 checksum 7ea340377469b44df88d5936c2ff4134
Compiled from "AntFileScanner.java"
class biz.gabrys.maven.plugin.util.io.AntFileScanner implements biz.gabrys.maven.plugin.util.io.FileScanner
minor version: 0
major version: 49
flags: ACC_SUPER
I run the analysis using Jenkins 1.619 with SonarQube Plugin 2.2.1. I use SonarQube 5.1.1 with Java Plugin 3.4.
How can I correct it?