Fix uncheched warnings for code instrumented by Clover

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 3.3.0
    • Affects Version/s: 3.2.2
    • Component/s: Instrumentation
    • None

      Follow up of CLOV-1399:

      I tried it with 3.2.2 same issue for every instrumented class.
      [WARNING] /Users/kasperni/workspace/cake-container/cake-container/cake-container-api/target/clover/src-instrumented/org/cakeframework/container/RuntimeContainerException.java:[24,758] unchecked cast
      required: I
      found: java.lang.Object

      It is this generated line that generates the warning:

      return (I) java.lang.reflect.Proxy.newProxyInstance(l.getClass().getClassLoader(), l.getClass()
      .getInterfaces(), h);

      It can be solved by adding a @SuppressWarnings("unchecked") to the instrumented file:

      @SuppressWarnings("unchecked")
      public static <I, T extends I> I lambdaInc(final int i, final T l, final int si)

      Unknown macro: {........}

            Assignee:
            Marek Parfianowicz
            Reporter:
            Marek Parfianowicz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: