GMaven (OLD... DO NOT USE)
  1. GMaven (OLD... DO NOT USE)
  2. MGROOVY-157

Wrong stubs created for two-dimensional arrays

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0-rc-3
    • Fix Version/s: 1.0-rc-3
    • Component/s: stub generation
    • Labels:
      None
    • Testcase included:
      yes
    • Number of attachments :
      0

      Description

      Declarations like Object[][] are transformed into [[] by the stub generator and the subsequent compilation of the stub then fails.

      To reproduce this, apply the following patch to the SimpleTest script in the gmaven-runtime-1.5 module

      Index: gmaven-runtime-1.5/src/test/resources/org/codehaus/groovy/maven/runtime/v15/stubgen/SimpleTest.groovy
      ===================================================================
      — gmaven-runtime-1.5/src/test/resources/org/codehaus/groovy/maven/runtime/v15/stubgen/SimpleTest.groovy (revision 13056)
      +++ gmaven-runtime-1.5/src/test/resources/org/codehaus/groovy/maven/runtime/v15/stubgen/SimpleTest.groovy (working copy)
      @@ -88,6 +88,9 @@
      /** Object array. */
      Object[] objectArray

      + /** 2D Object array. */
      + Object[][] matrix
      +
      /**

      • Javadoc for constructor.
        */

      and look at the output from stderr:

      /**

      • 2D Object array.
        */
        private [[] matrix = null;
        public [[] getMatrix() { throw new InternalError("Stubbed method"); }
        public void setMatrix([[] value) { throw new InternalError("Stubbed method"); }

        Activity

        Hide
        Jason Dillon added a comment -

        Should be fixed now.

        Show
        Jason Dillon added a comment - Should be fixed now.

          People

          • Assignee:
            Jason Dillon
            Reporter:
            Alexander Thiel
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: