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

methods with varargs are called with null when args are empty but should use an empty Array

    XMLWordPrintableJSON

Details

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

    Description

      from VarargsMethodTest:

      void testVarargsOnly()

      { assertEquals 0, varargsOnlyMethod() // todo: fix. throws NPE }

      Integer varargsOnlyMethod(Object[] args)

      { return args.size() }

      Attachments

        1. VarargsMethodTest.groovy
          2 kB
          Kim, Pilho

        Issue Links

          Activity

            People

              phkim Kim, Pilho
              codevise Dierk König
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: