Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-10792

Declared generic parameter on method not transferred to Closure

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.0.6
    • 5.0.0-alpha-1
    • Compiler
    • None

    Description

      This is probably a duplicate, but I'm not sure which of.

      I'm using Awaitility's until(Callable<Boolean>) and passing it a closure:

      List<String> buffer = []
      ...
      await().until { buffer }
      

      Expected behavior: buffer is coerced to a boolean using Groovy truth.

      Actual behavior:

      java.lang.ClassCastException: class java.util.ArrayList cannot be cast to class java.lang.Boolean
      

      Attachments

        Issue Links

          Activity

            People

              emilles Eric Milles
              chrylis Christopher Smith
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: