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

GString is not always converted to String when calling a Java method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-beta-4
    • 1.0-beta-5
    • None
    • None

    Description

      import org.xml.sax.helpers.AttributesImpl

      key = "a"
      attributes = new AttributesImpl()

      attributes.addAttribute("", "", "${key}", "", "")

      throws:

      java.lang.IllegalArgumentException: argument type mismatch

      attributes.addAttribute("", "", "${key}".toString(), "", "")

      works

      Attachments

        Issue Links

          Activity

            People

              markcc Mark C Chu-Carroll
              tug John Wilson
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: