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

Fix uncheched warnings for code instrumented by Clover

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 3.3.0
    • 3.2.2
    • 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: {........}

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

              Created:
              Updated:
              Resolved: