Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8014023

When a method reference to a local class constructor is contained in a method whose number of parameters matches the number of constructor parameters compilation fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 8
    • 8
    • tools
    • None
    • 8
    • b91
    • generic
    • generic
    • Verified

      Nonsensical errors like the following occur:

      error: constructor BoxingAdapter in class BoxingAdapter cannot be applied to given types;
        required: Consumer<Integer>
        found: Supplier<OfInt>
        reason: argument mismatch; Supplier<OfInt> cannot be converted to Consumer<Integer>
      1 error

      Which is generated by the attached SpliteratorTestHelper.java

            rfield Robert Field (Inactive)
            rfield Robert Field (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: