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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • 3.1.3
    • Affects Version/s: None
    • Component/s: Instrumentation
    • None
    • Environment:

      All Environments

      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.

              Assignee:
              Michael Studman (Inactive)
              Reporter:
              Manoj Dayaram
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: