Uploaded image for project: 'Clover'
  1. Clover
  2. CLOV-1039

When instrumenting code, fully qualified class names should be used for Classes and Annotations being added to prevent ambiguous references.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 3.1.3
    • None
    • Instrumentation
    • 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.

      Attachments

        Activity

          People

            mstudman Michael Studman (Inactive)
            96eb78c084cb Manoj Dayaram
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: