1.8 instrumentation fails

XMLWordPrintable

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

      public class Foo {
      
          void readString(String name, Consumer<String> consumer) {}
      
          public static List<String> LIST = Foo.create(String::new, (instance, configuration) -> {
              configuration.readString(null, e -> System.out.print(e));
          });
      
          public static <T> List<T> create(Supplier<T> supplier, BiConsumer<T, Foo> configurator) {
              return null;
          }
      }
      

      fails with
      Foo.java:[31,49] incompatible types: cannot infer type-variable(s) T,I,T
      [ERROR] (argument mismatch; I cannot be converted to java.util.function.Supplier<java.lang.String>)
      and
      Foo.java:[32,106] incompatible types: cannot infer type-variable(s) I,T
      [ERROR] (argument mismatch; java.lang.Object is not a functional interface)

            Assignee:
            Marek Parfianowicz
            Reporter:
            Deleted Account (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: