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

map.class returns null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • 1.1-beta-1
    • None
    • None
    • Groovy: Version: 1.0 JVM: 1.5.0_07-87
      Env: Mac OS X, Macbook 17"

    Description

      Running this code in groovy:
      memo = [ 0 : 1 , 1 : 1 ]
      println "memo.class = ${memo.class}"
      println "memo.getClass().getName() = ${memo.getClass().getName()}"

      .. produces:
      memo.class = null
      memo.getClass().getName() = java.util.HashMap

      To simplify:
      println "[1].class = ${[1].class}"
      println "[1:1].class = ${[1:1].class}"
      produces:
      [1].class = class java.util.ArrayList
      [1:1].class = null

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            backspaces Owen Densmore
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: