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

+ not concatenating

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0-JSR-3
    • None
    • None
    • Java 1.5.0_03 on Windows XP.

    Description

      println ([1]+[2]) produces [1, [2]], not [1, 2]. This is true for longer lists, and lists of other things.

      Setting breakpoints in DefaultGroovyMethods.plus, both the (Colleciton, Collection) and (Collection, Object) version, revales that MetaMethod.inkvoke() calls:

      reflector.invoke(this, object, arguments);

      where object = null and arguments is an Object[] with the two ArrayLists. But for some mysterious reason, Collection_GroovyReflector.invoke() calls plus(Collection, Object) rather than plus(Collection, Collection).

      This is the end of my foo, I don't know how to figure out what's going on inside the reflector.

      This is in Java 1.5.0_03, if that makes a difference.

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            mcspanky Martin C. Martin
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: