Details
-
Bug
-
Resolution: Fixed
-
Medium
-
None
-
None
-
All Environments
Description
My specific issue comes with the @SuppressWarnings(
{"fallthrough"}) annotation that is added by clover's instrumentation.In the same java file, we are importing the following from the findbugs library:
import edu.umd.cs.findbugs.annotations.*;
The above package also contains a SuppressWarnings annotation. Thus, when the instrumented class is compiled, I'm greeted with this error:
/tmp/clover9189767877125005725.tmp/search/smartscope/SmartSearchData.java:42: reference to SuppressWarnings is ambiguous, both class edu.umd.cs.findbugs.annotations.SuppressWarnings in edu.umd.cs.findbugs.annotations and class java.lang.SuppressWarnings in java.lang match
This could all be resolved if clover used @java.lang.SuppressWarnings({"fallthrough"}
) instead of just the annotation without the package specification.
I assume other bugs like this exist as well involving other classes/annotations that clover adds, but this is the one we have encountered.
Just an FYI, I'm using clover 3.1.0, however, I assume this issue stands in all clover versions.