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

Java 1.8 stream example instrumentation fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Medium Medium
    • 3.2.2
    • 3.2.2
    • Instrumentation
    • None

      public class Foo {
          String num;
      
          public Set<String> create() {
              List<Foo> l = new ArrayList<>();
              return l.stream().map(e -> e.num).collect(Collectors.toSet());
          }
      }
      

      Fails with
      incompatible types: inference variable T has incompatible bounds
      [ERROR] equality constraints: java.lang.String
      [ERROR] lower bounds: java.lang.Object

            mparfianowicz Marek Parfianowicz
            4d85d3f9-8aa3-417a-bb6f-61e186be8e94 Deleted Account (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: