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

respect null values when unboxing arrays

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-beta-10
    • 1.0-beta-10
    • groovy-jdk
    • None

    Description

      class ArrayAutoboxingTest extends GroovyTestCase {

      void testUnwantedAutoboxingWhenInvokingMethods()

      { blah2(new int[2*2]) }

      blah2(int[] wobble)

      { println(wobble) }

      }

      this fails because the given int[] is convertet to an Integer[] with null values and then converted back to an int[] where null.intValue() is causing a NullPointerException

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: