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

Calling a vararg method with no varargs causes IllegalArgumentException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6-rc-1, 1.6-rc-2
    • 1.6.1, 1.7-beta-1
    • None
    • None

    Description

      "".metaClass.hasMetaMethod("trim")
      

      causes:

      java.lang.IllegalArgumentException: wrong number of arguments
      

      Apparently MetaMethod#invoke is used where it should be MetaMethod#doMethodInvoke.

      http://www.nabble.com/Change-to-varargs-in-1.6.-tt21698048.html

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            ldaley Luke Daley
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: